Shaping with 'srr-queue bandwidth limit'

Unanswered Question
Mar 5th, 2009
User Badges:

On a 3750 there's an interface config like:


interface FastEthernet0/1

switchport mode access

speed 10

srr-queue bandwidth shape 5 0 0 0

srr-queue bandwidth share 25 25 25 25

srr-queue bandwidth limit 50

priority-queue out


So queue 1 will get 20% of the >physical< bandwidth which is 2Mbit/s.

And it will be shaped to 2Mbit/s.


Queue 2 to 4 each will get 1/3 of the >remaining limited< bandwidth which is 3Mbit/s.


So Q2,Q3,Q4 will be guaranteed a bandwidth of around 1Mbit/s each.


So shaped queues will refer to the physical bandwidth and shared queues refer to the rest, the limited bandwidth.


Right? Comments?


Juergen






  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Edison Ortiz Thu, 03/05/2009 - 13:12
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Shaped queues will guarantee *and* limit the queue to the amount specified, in your case 2Mbps (1/5 * 10Mbps). It's similar to implementing policing with MQC.


With Shared queue the bandwidth is guaranteed at this level but not limited to it. In your case, you are using the shape on Queue1 so you are taking that queue out of the sharing queues. Based on those calculations the share bandwidth guaranteed on those queues is as follow:


4/(25+25+25) = 0.053

0.053 * 10,000bps = 533kbps


This command is similar to the bandwidth command within MQC.


HTH,


__


Edison

jsommer Sat, 03/07/2009 - 23:55
User Badges:

Why is it 4/(25+25+25)?


I thought it is 25/(25+25+25) thus the factor should be 0,333.


And there is the additional command "srr-queue bandwidth limit 50" shaping to a overall bandwidth of 5 Mbit/s (50% of 10Mbit/s).


So 5Mbit/s overall, minus 2Mbit/s of queue 1 (shaped), that's 3Mbit/s.

Q1,Q2,Q3 will be given 1Mbit/s each since all of them use factor 0.333


I'm a bit confused as you can see.


Unfortunately there's no documentation which gives specific and exact information on that.


Juergen

Edison Ortiz Tue, 03/10/2009 - 11:34
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Juergen,


My apologies on my previous post. While reading the documentation page, I based my response on an example given there - as you can see it confused me as well :)


Yes, your calculations seem right. One thing I want to point out, you aren't limiting Q2-Q4 to 1Mbps. You are simply applying bandwidth guarantee up to 1Mbps on those queues. Each of those queues can potentially service up to 5Mbps if the other queues are idle. The only queue with a limiter is Q1.


Again, sorry for the early misinformation.


__


Edison.

Kamal Machareka Mon, 03/31/2014 - 11:22
User Badges:

I have to bring this discussion back to life.

Not sure why this couldn't be simpler from a command and concept perspectives, but it's fun to run into a challenge every now and then.

Well, I want to comment on a couple of things. First, I believe the equation is neither 4/(25+25+25) nor 25/(25+25+25). Per the 3750 documentation it's actually 25/(25+25+25+25);

http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750/software/...

The result is 25% of the bandwidth to each queue. If you lock in 20% to queue 1 and consider the verbiage about ignoring the share configuration for queue 1 when shape is in play. I belive that you're wasting 5% of your bandwidth; 75%+20%=95%

Then the other thing I'm not so clear on is whether the shared percentages apply to the total bandwidth, pre-shaping, or the remaing bandwidth post-shaping!

In my configuration, I did the following;

bandwidth 100000
srr-queue bandwidth limit 50
srr-queue bandwidth shape 5 0 0 0
srr-queue bandwidth share 2 3 2 3

The need is to limit the bandwidth of a 1Gbps link to 50Mbps. Reserve 20Mbps for VoIP traffic in queue 1 and share the rest as 30% to queue 2, 20% to queue 3 and 30% for 4.

I would much appreciate experts' feedback.

Kamal Machareka Tue, 03/25/2014 - 10:08
User Badges:

I take some of that back. After I posted, I thought about two other things; one is the likelihood of the “ignore” being applied pre-equation, in which case, your calculation of 25/(25+25+25) would be correct. The other is that even if the equation is calculated before ignore (due to shaping queue1), those percentages are just guarantees and they will not limit usage or more bandwidth, so the 5% will not be wasted.

 

This is a bit confusing. I hope I didn’t over complicate things!

Joseph W. Doherty Tue, 03/25/2014 - 10:26
User Badges:
  • Super Bronze, 10000 points or more

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

Bandwidth limit's minimum value is 10%, so you would be unable to limit a gig link to 50 Mbps (5%).  You would need to run the link at 100 Mbps.

 

Then (assuming you want to cap VoIP at 20 Mbps, yet give it LLQ/PQ like treatment):

srr-queue bandwidth limit 50
srr-queue bandwidth shape 5 0 0 0 !this assuming 1/5 of 100 Mbps, not 1/5 of 50 Mbps
srr-queue bandwidth share 255 3 2 3 !ratios are what really matters

Kamal Machareka Tue, 03/25/2014 - 12:53
User Badges:

Thanks Joseph,

I did notice that the minimum value for the "srr-queue bandwidth limit" command is 10, therefore, I change the interface bandwidth to 100Mbps (bandwidth 100000). I then halfed it with the srr-queue command (srr-queue bandwidth limit 50).

Assuming that the two commands work well together, I hope I will get the results I desire but I'll be doing some testing.

If that proves to be a problem I may have to reach out to our ISP and ask that we configure both ends for a lower speed. The speed command must have the higher hand!

Joseph W. Doherty Tue, 03/10/2009 - 16:52
User Badges:
  • Super Bronze, 10000 points or more

How about?


"And there is the additional command "srr-queue bandwidth limit 50" shaping to a overall bandwidth of 5 Mbit/s (50% of 10Mbit/s). "


Correct, but keep in mind it's not exact. NB:"These values are not exact because the hardware adjusts the line rate in increments of six. "


This command "priority-queue out " is documented as "When you configure this command, the SRR weight and queue size ratios are affected because there is one less queue participating in SRR. This means that weight1 in the srr-queue bandwidth shape or the srr-queue bandwidth share command is ignored (not used in the ratio calculation). "


My understanding, traffic in Q1 could use full port speed (or as limited by "srr-queue bandwidth limit").


"srr-queue bandwidth shape 5 0 0 0" indicates Q2, Q3, and Q4 all are in share mode. "srr-queue bandwidth share 25 25 25 25" indicates Q1, Q2 and Q4 all get equal shares of bandwidth but can obtain more if unused by other queues.


Further information can be found in the QoS chapter of the 3750 config guide, e.g. http://www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_50_se/configuration/guide/swqos.html


[edit]

What's not clear is whether the SSR shaper also limits the Expedite Queue bandwidth. From the examples, it looks as it should, yet the documentation notes weigtht1 is ignored, although with the additional information in reference to bandwidth ratios. If just the latter, than Edison could be correct that Q1 is shaped at 20%. (Yet a shaper doesn't make sense for a priority queue, as would a policer.)

Actions

This Discussion