Cisco QoS – SRR Share & Shape Impact

ciscocisco-2960cisco-iosqos

I am working on understanding the impact of using shaping and sharing with the SRR scheduler. Given these 2 commands on an interface:

switch(config-if)#srr-queue bandwidth share 40 20 30 20
switch(config-if)#srr-queue bandwidth shape 0 20 0 0

Gives me this in the configuration:

switch#show mls qos interface gigabitEthernet 1/0/5 queueing | include Sha  
Shaped queue weights (absolute) :  0 20 0 0
Shared queue weights  :  40 20 30 20

I can understand the share command calculates the bandwidth like following:

Q1/(Q1+Q2+Q3+Q4)*100

With values that is:

Q1=40/(40+20+30+20)*100

So if i fill this with the values above, i get following bandwidth allocation for each queue:

Q1=36%
Q2=18%
Q3=27%
Q4=18%

But now, the shaping command comes into play. Cisco documentation says following:

If you configure a weight of 0, the corresponding queue operates in
shared mode. The weight specified with the srr-queue bandwidth shape
command is ignored, and the weights specified with the srr-queue
bandwidth share interface configuration command for a queue come into
effect. When configuring queues in the same queue-set for both shaping
and sharing, make sure that you configure the lowest number queue for
shaping.

So the default configuration on an interface looks like this:

switch#show mls qos interface gigabitEthernet 1/0/6 queueing | include Sha
Shaped queue weights (absolute) :  25 0 0 0
Shared queue weights  :  25 25 25 25

So as far as I understand, the 25 shared weight for queue1 is ignored because this queue is being shaped. If queue2 is full, it can take unused weight from queue3 and queue4, giving it a max weight of 75. So does this mean, that if we enable QoS, leave all the settings at default and only have DSCP0 traffic (assigned to queue2 per default) we can utilize only 75% interface bandwidth?

Platform is a Cisco Catalyst 2960X switch.

Best Answer

So as far as I understand, the 25 shared weight for queue1 is ignored because this queue is being shaped. If queue2 is full, it can take unused weight from queue3 and queue4, giving it a max weight of 75. So does this mean, that if we enable QoS, leave all the settings at default and only have DSCP0 traffic (assigned to queue2 per default) we can utilize only 75% interface bandwidth?

Your assumption is correct.

With Shaping enabled, Queue 1 is removed from the 'sharing' and any packet entering Queue 1 will be de-queued first but shaped at 1/25 of the interface bandwidth.

You will need to enable priority-queue out on your interface, otherwise it will not work.

The 3 remaining queues, will continue sharing the remaining bandwidth as you have 0 as the weight on the shaping command. So yes, you can set the default as DSCP0 and that will be able to utilize 75% of the remaining bandwidth.

I would like to point out though, that Auto-QoS uses sharing only. This allows for all queues to utilize 100% of the bandwidth, if other queues are not transmitting. In case of a congestion, the queues will be streamlined into the specified values.