WFQ Dynamic Queues

Based on this link, http://www.cisco.com/en/US/docs/ios/12_2/qos/command/reference/qrfcmd1.html#wp1098249
the configuration of WFQ is based on the following command fair-queue [congestive-discard-threshold [dynamic-queues [reservable-queues]]]

The number of dynamic queues WFQ uses by default is based on the interface bandwidth.  Using the default settings for an interface WFQ uses 256 Dynamic queues.   the number of queues can be from a configured range in between 16 and 4096

R1(config-if)#do show run int s0/0
Building configuration…

Current configuration : 107 bytes
!
interface Serial0/0
bandwidth 32
ip address 10.2.6.1 255.255.255.0
encapsulation ppp
fair-queue
end

R1(config-if)#do show int s0/0
Serial0/0 is up, line protocol is up
Hardware is PowerQUICC Serial
Internet address is 10.2.6.1/24
MTU 1500 bytes, BW 32 Kbit, DLY 20000 usec,
reliability 253/255, txload 214/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: CDPCP, IPCP, loopback not set
Last input 00:00:01, output 00:00:02, output hang never
Last clearing of “show interface” counters 1d09h
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 28974
Queueing strategy: weighted fair   —————————————> Here is the Q Algo
Output queue: 0/1000/64/28974 (size/max total/threshold/drops)
Conversations  0/1/16 (active/max active/max total) —- Number of Queues for conversation
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 24 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 59000 bits/sec, 38 packets/sec
6315174 packets input, 1263781475 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
3 input errors, 0 CRC, 3 frame, 0 overrun, 0 ignored, 0 abort
7319381 packets output, 1497005310 bytes, 0 underruns
0 output errors, 0 collisions, 3 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up  DSR=up  DTR=up  RTS=up  CTS=up

R1(config-if)#band 32
R1(config-if)#band 127
R1(config-if)#do show run int s0/0
Building configuration…

Current configuration : 116 bytes
!
interface Serial0/0
bandwidth 127
ip address 10.2.6.1 255.255.255.0
encapsulation ppp
fair-queue 64 16 0
end

R1(config-if)#int s0/0
R1(config-if)#no  fair-queue 64 16 0
R1(config-if)#fair-queue
R1(config-if)#do show int s0/0
Serial0/0 is up, line protocol is up
Hardware is PowerQUICC Serial
Internet address is 10.2.6.1/24
MTU 1500 bytes, BW 127 Kbit, DLY 20000 usec,
reliability 255/255, txload 98/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: CDPCP, IPCP, loopback not set
Last input 00:00:00, output 00:00:01, output hang never
Last clearing of “show interface” counters 1d09h
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 28974
Queueing strategy: weighted fair
Output queue: 0/1000/64/28974 (size/max total/threshold/drops)
Conversations  0/1/32 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 95 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 49000 bits/sec, 33 packets/sec
6315178 packets input, 1263781795 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
4 input errors, 0 CRC, 4 frame, 0 overrun, 0 ignored, 0 abort
7319385 packets output, 1497005698 bytes, 0 underruns
0 output errors, 0 collisions, 5 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up  DSR=up  DTR=up  RTS=up  CTS=up

R1(config-if)#

in WFQ, packets are classified by flow. For example, packets with the same source IP address, destination IP address, source TCP or User Datagram Protocol (UDP) port, destination TCP or UDP port, and protocol belong to the same flow, if there are a large number of concurrent flows, it is likely that 2 flows end up in the same queue.

Probability = 1 – [(Number of Queues!)/((Queues^flows) * (Queues – flows)!)]

The following is the sample calulation of the probability value for 5 flows and 64 queues

Probability = 1 – ((64!) / ((64^5) * (59!)))  == 0.147894 or almost 15% of that a flow can end in the same queue as another flow.

Cheers

A Networker Blog

Advertisements

One thought on “WFQ Dynamic Queues

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s