0

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)

Soubhik
  • 9
  • 1
  • If you know/estimate mean packet size in advance, you simply skip empty queues. [Ref](http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=105173). – Michael Foukarakis Jun 05 '18 at 09:27

1 Answers1

0

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

Emut
  • 319
  • 4
  • 10
  • If you are using turn based service, rather than partitioning the bandwidth, approach to get the same result as the above answer would be removing empty queue from the service list. (i.e. ABACBABACD would become AACAACD if A=40% B=30% C=20% D=10% in weight) – Emut Jun 05 '18 at 11:39