Weighted Round Robin


Weighted Round Robin serves packets from every non empty queue in cycle manner. Number of packets, that WRR algorithm takes in cycle, is based on configured weight, which is normalised to unity.
Supposing, normalised weights of depicted above queues are respectively 3 and 2, then number of packets taken in one cycle is 5. First, 3 packets are taken from Class #1 and after 2 from Class #2.
But, one could ask, what if there is no packets for serving in the queue? WRR simply jumps to next queue and pretends that it has already served previous queue. WRR is example of non-work-conserving scheduler, meaning, that it doesn’t waste time for unproductive work. There is no such situation, that there is at least one packet in the queue and output link is idle.
Weighted Round Robin is pretty good scheduling mechanism. And it becomes better if packets sizes are constant – in real networks it is impossibile! If sizes of packets in Class #1 queue were 200B and 1000B in Class #2, and if configured weights were these same (3/2), then real bandwith would be shared in proportion 3/10. It happens, because time of service from Class #2 is 5 times longer than from Class #1.
There are two modifications of Round Robin mechanism:
  • Deficit Round Robin – more fair taking into consideration packets sizes
  • Shared Round Robin – very similar to WRR, but in one cycle it can visit every queue many times, according to weigth (=number of packets, that it must take in the cycle). Another words: packets are mixed on Output link.
As you noticed, Round Robin mechanisms aren’t so trivial and it is better to know what mechanism we are using and what for.

Comments