Qos classes and queues

Simple question. Let’s say I have a 3750 and want to have 8 qos classes, so they all get a fair share during congestion. Is it then wise to allocate all the memory to 1 queue and use it for all the classes. Or is this not working cause you have only 4 queues? I read somewhere with classes it sort of behaves as a sub-queue.

Only thing that I read in the end to end qos book is by default the classes are served in a rr matter. Hopefully this is true.

Hi Peter,

The 3750 has 4 output queues, those are served with round robin:

They do support different threshold per queue though:

You could assign different Cos / DSCP values to different thresholds. When the queue gets full, certain packets are then dropped before others.

Is all of your traffic tagged? If not, it might be best just to leave QoS disabled. With the default setup, unmarked packets/frames are treated pretty well. Once you enable QoS, and you have mostly unmarked traffic then you’ll notice that unmarked traffic is treated worse than with QoS disabled.

If you have one application (like VoIP or realtime Video) that you want to give a better treatment and still give all your other (unmarked) traffic a decent share then you use Q1 for that application and map everything else to Q2, giving Q2 most of the buffers. 50% of the buffers assigned to a queue gives you about the same performance as QoS disabled. You can’t disable Q3/Q4 but you can assign the lowest values to these two and don’t assign anything to them.

Rene

Thanks for this very helpful insight!

So if you are creating classes (in a policy-map) and not assign any specific tags (Cos / DSCP), it will just be treated as traffic without any special segmentation?

Cause otherwise it would be possible to split traffic on a access list base, instead of a connection flow.

That’s right, and this can be a big issue on switches. One big difference when it comes to QoS is that on routers, queuing is done in software when there is congestion. On switches, you are “reprogramming” the ASICs/queues.

Here’s how you can see which DSCP / CoS values are mapped to which queues/thresholds:

SW1#show mls qos maps dscp-output-q 
   Dscp-outputq-threshold map:
     d1 :d2    0     1     2     3     4     5     6     7     8     9 
     ------------------------------------------------------------
      0 :    02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 
      1 :    02-01 02-01 02-01 02-01 02-01 02-01 03-01 03-01 03-01 03-01 
      2 :    03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 
      3 :    03-01 03-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 
      4 :    01-01 01-01 01-01 01-01 01-01 01-01 01-01 01-01 04-01 04-01 
      5 :    04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 
      6 :    04-01 04-01 04-01 04-01

For example, everything that is marked with DSCP 0 (00) goes to Queue 2 up to Threshold 1. Here’s the default queue-set:

SW1#show mls qos queue-set 1
Queueset: 1
Queue     :       1       2       3       4
----------------------------------------------
buffers   :      25      25      25      25
threshold1:     100     200     100     100
threshold2:     100     200     100     100
reserved  :      50      50      50      50
maximum   :     400     400     400     400

Once you enable QoS globally, your DSCP 0 traffic will end up in a queue that gets only 25% of the buffer space, that’s it. Now we can’t see how much buffer space the queue for DSCP 0 traffic has if QoS is disabled, but based on some tests, it’s probably somewhere around 50-60%.

This is why when you just enable QoS on a switch, most people get worse performance. 90% of their traffic is unmarked so their traffic might get dropped in the queue.

If you plan on enabling QoS on your switch, you need to think ahead about your DSCP / Cos markings or configure the queues so your unmarked traffic gets more headroom. This is something you’ll need to lab up before you implement it on a production network.

Hope this helps!

Rene