3750 QoS: Queue Buffer allocation vs. Queue output bandwidth

Unanswered Question
Feb 28th, 2012

Hello!

I've been looking at QoS sample configs on CCO for LAN switches (3560s and 3750s), and have a question:

Would it not be a good idea usually to have the relative memory buffer allocation to the 4 queues be the same as the interface output bandwidth share for the queue?  I see that they are often different, and so am curious why.

Here's an excerpt from "Example 2-32 Catalyst 2970/3560/3750 Queuing and Dropping" in the Enterprise QoS SRND:

CAT2970(config)#mls qos queue-set output 1 threshold 2 70 80 100 100

     ! Sets Q2 Threshold 1 to 70% and Q2 Threshold 2 to 80%

CAT2970(config)#mls qos queue-set output 1 threshold 4 40 100 100 100

     ! Sets Q4 Threshold 1 to 40% and Q4 Threshold 2 to 100%

CAT2970(config)#

CAT2970(config)#interface range GigabitEthernet0/1 - 28

CAT2970(config-if-range)# queue-set 1

     ! Assigns interface to Queue-Set 1 (default)

CAT2970(config-if-range)# srr-queue bandwidth share 1 70 25 5

     ! Q2 gets 70% of remaining BW; Q3 gets 25% and Q4 gets 5%

CAT2970(config-if-range)# srr-queue bandwidth shape  3 0  0  0

     ! Q1 is limited to 1/3 of the total available BW

CAT2970(config-if-range)# priority-queue out

     ! Q1 is enabled as a PQ

CAT2970#show mls qos queue-set 1

Queueset: 1

Queue     :       1       2       3       4

----------------------------------------------

buffers   :      25      25      25      25

threshold1:     100      70     100      40

threshold2:     100      80     100     100

reserved  :      50     100      50     100

maximum   :     400     100     400     100

CAT2970#

So, Q1 (the priority queue) gets ~33% of the bandwidth.  Of the remaining ~66%, Q2 gets to have at least 70%, Q3 gets 25% and Q4 gets 5%.  (Since these are in shared mode, they can each have more of the b/w if another queue isn't using it.)

It *looks* like there's a mis-match between what's permitted by the "srr-queue bandwidth share" command, and the buffer assignment.  Wouldn't you want to set things up so that the buffers would be allocated to each queue in a similar relative amount?  In fact, of queues 2-4, Q3 is allowed to grow to 400% of the base allocation, while Q2 cannot grow above its base allocation at all.

Thanks for any insight on what I might be missing here!

Deb

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 5 (1 ratings)
nkarpysh Tue, 02/28/2012 - 18:25

Hi Deborah,

Let me go through it

These commands:

for this one your understanding is correct:

#

CAT2970(config-if-range)# srr-queue bandwidth shape 3 0 0 0 

#

! Q1 is limited to 1/3 of the total available BW 

as Q1 is now shaped for 1/3 of the queue. All other queues are 0 for shape thus they will participate in share

But  the share command below is distributing the total bandwidth not the remaining one

AT2970(config-if-range)# srr-queue bandwidth share 1 70 25 5

#

! Q2 gets 70% of remaining BW; Q3 gets 25% and Q4 gets 5% - this is true because Q1 particpate in share. If we removed share command above then these queues
will compete for 100% of bandwidth

http://www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_55_se/commmand/reference/cli3.html#wp1947601

So Q2 would get 70% of total and the other queues corresponding. As Q 1 here also participate in share calculation and gets 1/(1+70+25+5) which is 0.01. These shape values consider in which proportion the packets will go out of the wire and not the total bandwidth each queue will receive. These value consider on which proportion packets will be dequeued to the wire. So Q1 is first here as that is priority and we can't send other packets until Q1 is sent up to the shape value above (30%). But rest queues now consider among themselves on which proportion they will send traffic once Q1 is stopped.

So these two commands above deciding on how the packets are sent to a wire. E.G. sent first Q1 packets up to 1/3 of interfaces bandwidth, then send say 4 packets of Q2, then 1 packet of Q3 and Q4, then again packets from Q2 and so forth untill Q1 can send further - this is what shape and share do.

But where do we store the exsessive packets which are coming in particular queue while th other queue is being sent?! E.G. say packets for Q3 arrive - and we are still sending Q1 packets. Here the buffer take their role - these packets are started to be queued and those buffer values show how much buffer we are allocating to each queue and threshold.

E.G. you can have packets coming to Q4 with threshold set to 1 or 2 - those with threshold 1 will start to drop if queue is 40% full according to your configuration but packets with Threshold 2 can fill the queue up to 100%.

When you see threshold being higher than 100% it means that this particular buffer can take additional buffers from switch common pull up to the THRESHOLD*INT_Buffer/100 values - e.g. 400*X/100= 4X -  which is equal to size of 4 interface buffers (until that pull is exausted).

So share/shape values correspond to the proportion in which packets are being dequeued from the buffers to the wire. And buffer allocation are just the size of those buffers. Lower the buffers - earlier we start to drop excessive traffic still keeping same share proportions.

Hope this clear.

BTW this is a good document explaining it in good details:

https://supportforums.cisco.com/docs/DOC-8093

Nik

JosephDoherty Wed, 02/29/2012 - 06:39

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Would it not be a good idea usually to have the relative memory buffer allocation to the 4 queues be the same as the interface output bandwidth share for the queue?  

Not necessarily, for instance, the inverse might be more appropriative.  Consider if a queue has a larger proportion of bandwidth, it might be less likely to queue (buffer).  Best example of this might be queue 1 enabled for PQ.  Assuming the offered traffic to this queue will not oversubscribe the egress bandwidth, minimum buffering might be allocated for this queue.

Actual optimal buffer allocations would depend not only on proportions of bandwidth given to the queues but how that allocation compares to expected traffic loading.  Additionally, just as you might take advantage of different tail drop depths within a single queue, relative to different traffic types within that queue, buffering could be part of your drop strategy.

Actions

Login or Register to take actions

This Discussion

Posted February 28, 2012 at 3:22 PM
Stats:
Replies:2 Avg. Rating:5
Views:1360 Votes:0
Shares:0
Categories: Switches
+

Related Content

Discussions Leaderboard

Rank Username Points
1 15,007
2 8,150
3 7,730
4 7,083
5 6,742
Rank Username Points
165
82
70
69
55