Q:

Why there is a maximum of 4096 queues in WFQ?

In QoS there is a variety of Queuing methods and one of them is WFQ, which organizes the flows in different queues where each queue has a weight that determines which flow will go first.
Now for calculating the weight the formula used is:
Weight = 4096 / (IP-precedence+1). Where 4096 is the maximum number of queues, so why the maximum number is 4096? It is a pre-established number or it is based on some criteria?

A:

This platform specific limit, so it's just arbitrary limit Cisco came up with at one point in time, probably driven by memory restrictions of device of that era.

W=K/(precedence +1)
K= 4096 with Cisco IOS 12.0(4)T and earlier releases, and 32384 with
  12.0(5)T and later releases.

From: 
http://www.cisco.com/en/US/tech/tk543/tk545/technologies_q_and_a_item09186a00800cdfab.shtml#class

