Weighted Round Robin after queue is empty

343 Views Asked by At

In a weighted round robin implementation of packets, what should I do when a queue is empty? Example: suppose 4 queues have 10%, 30%, 20%, 40% weights. Now suppose 30% queue is empty - should I redistribute the weight to the other queues? If yes, then how should it be redistributed to other packets?

(I need an implementation which is done in linux kernels or other platforms previously in Weighted Round Robin scheduling)

1

There are 1 best solutions below

1
Emut On

If a queue is empty, one way to redistribute the weights is to keep it fair among the busy queues. Just give the extra bandwidth to other queues in proportion to their weights.

Example: If 30 is empty, others can be approximately adjusted as such:

10 -> 14.3

20 -> 28.6

40 -> 57.1