# How to know the Average Queue Size

Dec 31st, 2008

Hello,

I read the CBWFQ document regarding of average queue size.

http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/fswfq26.html#wp1019686

The average queue size is based on the previous average and the current size of the queue. The formula

is as follows, where n is the exponential weight factor, a user-configurable value:

average = (old_average * (1-1/2^n)) + (current_queue_size * 1/2^n)

My question is that, how can I know the current queue size in advance? Is there any command can show it? Do you have any idear.

Any experience or insight info is appreciated.

jeffrey

Correct Answer by Joseph W. Doherty about 7 years 9 months ago

.

.

Class-map: dscp_AF2x (match-any)

18930447 packets, 12209444772 bytes

30 second offered rate 0 bps, drop rate 0 bps

Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

18930442 packets, 12209444772 bytes

30 second rate 0 bps

Queueing

Output Queue: Conversation 139

Bandwidth remaining 16 (%)

(pkts matched/bytes matched) 0/0

(depth/total drops/no-buffer drops) 0/0/0

exponential weight: 9

mean queue depth: 0

.

.

I've highlighted the average WRED queue depth stat.

By the way, do you have any idear and experience about to set Minimum and Maximum threshold value regarding to ethernet bandwidth?

You might begin with 1/2 of (max as BDP and min 1/3 max). This also assumes TCP traffic.

Overall Rating: 5 (1 ratings)

## Replies

Giuseppe Larosa Wed, 12/31/2008 - 04:33

Hello Jeffrey,

you can see the current size with sh queueing

sh queueing int ser2/0/0

Interface Serial2/0/0 queueing strategy: VIP-based fair queueing

Serial2/0/0 queue size 0

pkts output 26856883303, wfq drops 0, nobuffer drops 0

WFQ: aggregate queue limit 6614 max available buffers 6614

Class 1: bandwidth 3000 exceed drops 0

Class 2: bandwidth 30000 exceed drops 0

The average queue size is used by WRED to manage congestion.

Hope to help

Giuseppe

Joseph W. Doherty Wed, 12/31/2008 - 04:47

"Is there any command can show it?"

Besides using sh queuing interface, as noted in Giuseppe's post, when using CBWFQ, sh policy-map out interface should usually show WRED's current average queue size in the stats.

"My question is that, how can I know the current queue size in advance?"

Not practically.

jefferyshi Thu, 01/01/2009 - 06:37

Hi Joseph and all,

I am use CBWFQ. Here is sho policy-map interface out, it seem can not see current average queue size.

I know the current average should change frequently per second. If exceed minimum threshold value, should some random drop occur. I want to know the current average queue size, and can help me to resize the threshold. By the way, do you have any idear and experience about to set Minimum and Maximum threshold value regarding to ethernet bandwidth?

PE2-C2651XM#show policy-map interface fastEthernet 0/1 output FastEthernet0/1

Service-policy output: DSCP_OUT

Class-map: class-default (match-any)

18957722 packets, 12212120505 bytes

30 second offered rate 0 bps, drop rate 0 bps

Match: any

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

50000000/50000000 312500 1250000 1250000 25 156250

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 18957715 3622180843 0 0 no

Service-policy : DSCP_OUT_1

Class-map: dscp_AF2x (match-any)

18930447 packets, 12209444772 bytes

30 second offered rate 0 bps, drop rate 0 bps

Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

18930442 packets, 12209444772 bytes

30 second rate 0 bps

Queueing

Output Queue: Conversation 139

Bandwidth remaining 16 (%)

(pkts matched/bytes matched) 0/0

(depth/total drops/no-buffer drops) 0/0/0

exponential weight: 9

mean queue depth: 0

dscp Transmitted Random drop Tail drop Minimum Maximum Mark

pkts/bytes pkts/bytes pkts/bytes thresh thresh prob

af11 0/0 0/0 0/0 32 40 1/10

af12 0/0 0/0 0/0 28 40 1/10

af13 0/0 0/0 0/0 24 40 1/10

af21 0/0 0/0 0/0 52 500 1/1

af22 18930444/12209440716 0/0 0/0 52 250 1/1

af23 0/0 0/0 0/0 52 250 1/1

af31 0/0 0/0 0/0 32 40 1/10

af32 0/0 0/0 0/0 28 40 1/10

af33 0/0 0/0 0/0 24 40 1/10

af41 0/0 0/0 0/0 32 40 1/10

af42 0/0 0/0 0/0 28 40 1/10

af43 0/0 0/0 0/0 24 40 1/10

cs1 0/0 0/0 0/0 22 40 1/10

cs2 0/0 0/0 0/0 24 40 1/10

cs3 0/0 0/0 0/0 26 40 1/10

cs4 0/0 0/0 0/0 28 40 1/10

cs5 0/0 0/0 0/0 30 40 1/10

cs6 0/0 0/0 0/0 32 40 1/10

cs7 0/0 0/0 0/0 34 40 1/10

ef 0/0 0/0 0/0 36 40 1/10

rsvp 0/0 0/0 0/0 36 40 1/10

default 0/0 0/0 0/0 20 40 1/10

Best regard

Thanks

Jeffrey

Joseph W. Doherty Thu, 01/01/2009 - 15:48

.

.

Class-map: dscp_AF2x (match-any)

18930447 packets, 12209444772 bytes

30 second offered rate 0 bps, drop rate 0 bps

Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

18930442 packets, 12209444772 bytes

30 second rate 0 bps

Queueing

Output Queue: Conversation 139

Bandwidth remaining 16 (%)

(pkts matched/bytes matched) 0/0

(depth/total drops/no-buffer drops) 0/0/0

exponential weight: 9

mean queue depth: 0

.

.

I've highlighted the average WRED queue depth stat.

By the way, do you have any idear and experience about to set Minimum and Maximum threshold value regarding to ethernet bandwidth?

You might begin with 1/2 of (max as BDP and min 1/3 max). This also assumes TCP traffic.