Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Help Understanding QoS Threshold

Can some explain what the following would do?

mls qos queue-set output 1 threshold 2 400 400 100 400---Are these based on percentages? If so, from what?
mls qos queue-set output 1 buffers 15 45 20 20----I don't understand this at all

Below is the configuration I am using on the 3750:

srr-queue bandwidth share 1 70 25 5
srr-queue bandwidth shape 3 0 0 0


mls qos srr-queue output cos-map queue 1 threshold 3  5
mls qos srr-queue output cos-map queue 2 threshold 1  2 4
mls qos srr-queue output cos-map queue 2 threshold 2  3
mls qos srr-queue output cos-map queue 2 threshold 3  6 7
mls qos srr-queue output cos-map queue 3 threshold 3  0
mls qos srr-queue output cos-map queue 4 threshold 3  1
mls qos srr-queue output dscp-map queue 1 threshold 3  46
mls qos srr-queue output dscp-map queue 2 threshold 1  16 18 20 22 25 32 34 36
mls qos srr-queue output dscp-map queue 2 threshold 1  38
mls qos srr-queue output dscp-map queue 2 threshold 2  24 26
mls qos srr-queue output dscp-map queue 2 threshold 3  48 56
mls qos srr-queue output dscp-map queue 3 threshold 3  0
mls qos srr-queue output dscp-map queue 4 threshold 1  8
mls qos srr-queue output dscp-map queue 4 threshold 3  10 12 14
mls qos queue-set output 1 threshold 2 400 400 100 400
mls qos queue-set output 1 buffers 15 45 20 20

21 REPLIES

Re: Help Understanding QoS Threshold

Hi, could you able to know the answer? I'm also puzzled on the same point.

Re: Help Understanding QoS Threshold

Each port has a buffer. For egress there are 4 output queues.

With the following command you divide the buffer space among the 4 queues:

mls qos queue-set output <1/2> buffers 15 45 20 20 (sum = 100% of the buffer)

!<1/2> will be explained later

queue 1: 15%

queue 2: 45%

queue 3: 20%

queue 4: 20%

with the following command you map a cos value 6 and 7 to queue 2 thresshold 3:

mls qos srr-queue output cos-map queue 2 threshold 3  6 7

and with the following command you map a cos 3 to queue 2 and thresshold 2:

mls qos srr-queue output cos-map queue 2 threshold 2  3

So we mapped certain values to queue 2 but with different thressholds.

Thressholds and buffer usage is defined with the following command:

mls qos queue-set output <1/2> threshold queue thresshold1 thresshold2 reserved max

So for queue 2:

mls qos queue-set output <1/2> threshold 2 400 400 100 400

thresshold 1: 400%

thresshold 2: 400%

thresshold 3: 100% (implicit, not configurable)

reserved: 100%

max: 400%

thresshold means: if the buffer size is filled for x % start dropping traffic.

Thus if we have the following config:

mls qos srr-queue output cos-map queue 2 threshold 2  4

mls qos srr-queue output cos-map queue 2 threshold 3  6 7

mls qos queue-set output <1/2> threshold 2 40 70 90 400

When the buffer is filled with 70% of traffic it will start dropping traffic with cos 4 and not traffic with cos 6 or 7 because it's mapped to thresshold 3 (=100%)

the reserved and max value means:

[buffer size: mls qos queue-set output <1/2> buffers 15 45 20 20 ]

[mls qos queue-set output <1/2> threshold 2 40 70 90 400]

if you take for example queue 2. You configured 90% as reserved. So you reserve 90% of the buffer size of queue 2 (which was 45% of the total buffer space)

Thus 90% of the 45% of the buffer size is reserved.

The remaining 10% from queue 2 is seen as common buffer space. Can be used by queue 1, 3, 4

Max reserved means, how much it may expanded and use buffer space from the common pool buffer space as explained above.

You can create 2 sets. The set you define you indicate with the <1/2>. By this you can make two flavours.

By default all ports uses set 1.

mls qos queue-set output 1 buffers 15 45 20 20 ! queueset 1

mls qos queue-set output 2 buffers 5 5 5 80  ! queueset 2

as you see, there is a difference in how the buffers allocated to each of the four queues

int gig1/0/1

queueset 2

int gig1/0/2

queueset 1! default

so egress queue will use 15% for queue 1 on interface gig1/0/1 and 5% on gig1/0/2

Hope to help

plz rate usefull posts!

New Member

Re: Help Understanding QoS Threshold

Hi Davy. You gave an example on the 2nd drop threshold:

"mls qos queue-set output <1/2> threshold 2 40 70 90 400
When the buffer is filled with 70% of traffic it will start dropping traffic with cos 4 and not traffic with cos 6 or 7 because it's mapped to thresshold 3 (=100%)"

And what does 40 mean? Is it that CoS4 traffic will start getting dropped linearly when 40% of the queue is filled and when CoS4 traffic hits 70%, all CoS4 traffic will get dropped?

Thank you.

Re: Help Understanding QoS Threshold

thresshold 1 is for values mapped to thresshold 1

example

mls qos srr-queue output cos-map queue <1/2> threshold 1 

The buffersize concept (shared buffer, ...) is quite abstract ;-)

New Member

Re: Help Understanding QoS Threshold

Thanks Davy. I actually researched a little bit last night and found the answer. I couldn't wait...:-)

New Member

Help Understanding QoS Threshold

Hi...Could you pls point me to a link where this stuff is documented?

Thanks.

_ Greg

New Member

Hi Davy,

Hi Davy,

It was extremely useful for me.

Could you explain what does the output queues enqueued table mean ?

  output queues enqueued:

queue:    threshold1   threshold2   threshold3

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

queue 0:           0           0   151746002

queue 1:           0     2588524  3561844053

queue 2:           0   307654063  1408635950

queue 3:           0           0    78851084

Super Bronze

Disclaimer

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 wha2tsoever (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

I believe its a count of the number of packets/frames that needed to be queued for a certain queue.  The thresholds give an indication how large the queue was.

Corresponding stats would be the drop stats for the same queues and thresholds.

New Member

Hi,

Hi,

thx for you reply.

And What do you know where does the switch count the packets which  need to be enqueued but these are dropped due to buffer allocation problem. ( 3. step )

Before a packet is placed into an egress tx queue, the Asic ensures that this packet is allowed in by making several checks. 

1.      Is the reserved buffer count for the target tx queue empty enough to allow this packet in, and is the total number of buffers currently used by this port tx queue less than configured threshold value?  if so, then enqueue the packet using buffers from the reserved pool.

2.      Else are there enough free buffers in the common buffer pool for this packet?   And is the total number of buffers currently used by this Port tx queue less than the configured threshold value?  If both conditions are true the packet is enqueued using buffers from the common pool.

3.      Else the packet is dropped.

Super Bronze

As already noted, in the

As already noted, in the corresponding queue drop stats.  Do you need the actual command?

New Member

Help Understanding QoS Threshold

Sorry for picking up this old thread. I'm trying to find the configuration for this requirement:

  • Map COS1 to queue 1 and map COS3 to queue 2.
  • Drop COS1 traffic when the ingress queue level is between 60 and 100 percent.

mls qos srr-queue output cos-map queue 1 threshold 1 1

mls qos srr-queue output cos-map queue 2 threshold 1 3

mls qos queue-set output 1 threshold 1 60 100 50 400

SW01(config)#mls qos queue-set output 1 threshold 1 ?

  <1-3200>  enter drop threshold1 1-3200

  • Is this solution correct?
  • What should I configure for the "reserved threshold" and "max threshold"?
  • Why these percentage has a max of 3200?
New Member

Help Understanding QoS Threshold

Can someone help?

New Member

Re: Help Understanding QoS Threshold

Hi Jack,

to map CoS 1 to Queue 1 and CoS 3 to Queue 2, enter:

mls qos srr-queue output cos-map 1 1

mls qos srr-queue output cos-map 2 3

And then verify with show mls qos map cos-output-q

To drop CoS 1 traffic in Queue 1 when output queue level hits 60%, enter:

                                                               Q    Th1    Th2     Res    Max

mls qos queue-set output 1 threshold     1     60     100     100     400

                                                                                       Th1  CoS

mls qos srr-queue output cos-map queue 1 threshold     1     1

Th = Threshold

Res = Reserved

Max = Maximum

I don't know why the %'s max value is 3200.

Buffer weights determine what percentage of port buffer are available for each queue. The threshold, reserved,

and maximum values are all percentages of the buffer assigned to the queue. By default, each queue reserves 

half of its buffer space assigned. What it's not reserved goes into the common pool. Thresholds can be 

configured above 100% by allowing the queue to borrow from the common pool.

New Member

Help Understanding QoS Threshold

Alirio,

Thank you so much for your response. I'm a little confused on when to use "output" and when to use "input" keyward. Considering the packets we are mapped when coming in, shouldn't we use "input" instead? I noticed "mls qos queue-set" only supports "output" on my 3750 switch. Please explain the directions as well.

mls qos srr-queue input cos-map 1 1

mls qos srr-queue input cos-map 2 3

mls qos queue-set output 1 threshold     1     60     100     100     400

mls qos srr-queue input cos-map queue 1 threshold     1     1

New Member

Help Understanding QoS Threshold

Hi Jack,

You would use the input keyword to configure the actual input queues on switches that support them. I can't remember the hardware platforms, but on newer switches and bigger platforms, there are two input queues that could buffer frames in case the switching engine can't process frames or it's so busy that can't handle more incoming frames. Therefore, input queues are used to hold the frames until the switching engine is ready for those frames. In this way, you prevent dropping frames. Once frames are switched and ready to leave the switch, you use the output keyword you configure the egress queues in the outbound direccion.

The input queues are rarely utilized, however.

I'm going to send you a text file where I summarized Cat QoS and that may help you.

New Member

Help Understanding QoS Threshold

More I think, more questions I have ...

What's the difference between this two commands? Under what condition we need to use "threshold"?

mls qos srr-queue output cos-map queue 1 1

mls qos srr-queue output cos-map queue 1 threshold     1     1

How do I accomplish this requirement? 

  • Set Queue 1 to drop threshold in case that the traffic in the queue 1 reached 60%
  • Set Queue 2 to drop threshold in case that the traffic in the queue 2 is full
New Member

Help Understanding QoS Threshold

Hi Alirio,

Very good explanation, I have a doubt, what does the common pool memory comprise of?

what is the memory assigned to each port ?

I read that there are two segements of memory available in switches one segment equally assigned to each port and common pool memory shared by all the ports.

how to find memory size in common pool and each port buffer?

Cheers,

Shaggy.

New Member

Re: Help Understanding QoS Threshold

Your explanation was so handful but now I am trying to test MLS feature on my Cisco switch and I was surprised after see that the threshold of Queue 1 appears automatically:

Screen Shot 2017-10-15 at 20.18.42.png

I would like to know how calculate the Queue1 values.

Thanks in advance!

 

New Member

Help Understanding QoS Threshold

it all sounds good but when you get to the fact that the first threshold is configured at 400% and second thresold is also configured at 400% it gets confusing. how can you go over 100% in the first place and why you have 2 thresholds on the same queue with same percentages.

I guess my question is how is it possible to have a threshold configured over 100% ??

thanks in advance for any clarafication.

New Member

Help Understanding QoS Threshold

Hey Atef,

Apologies for the delayed response, I was out of station, as I mentioned earlier, there are two segments or portions of memory used in switches, one portion comprises of memory assigned to each port ( equally distributed ) for queuing and other portion comprises of memory ( it used when threshold is configured more than 100% ).

Cheers,

RS

Super Bronze

Re: Help Understanding QoS Threshold

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

See if this document helps: https://supportforums.cisco.com/docs/DOC-8093
50761
Views
101
Helpful
21
Replies
CreatePlease to create content