cancel
Showing results for
Did you mean:
cancel
Announcements
65024
Views
161
23
Replies
Highlighted
Beginner

## 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

23 REPLIES 23
Highlighted
Enthusiast

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

Highlighted
Enthusiast

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!

Highlighted
Beginner

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.

Highlighted
Enthusiast

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 ;-)

Highlighted
Beginner

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

Highlighted
Beginner

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

Thanks.

_ Greg

Highlighted
Explorer

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

Highlighted
VIP Expert

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.

Highlighted
Explorer

Hi,

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.

Highlighted
VIP Expert

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

Highlighted
Beginner

best explanation I have ever seen...

Highlighted
Beginner

Highlighted
Contributor

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?
Highlighted
Contributor

Can someone help?