简体   繁体   English

队列为空后的加权循环

[英]Weighted Round Robin after queue is empty

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. 示例:假设4个队列的权重分别为10%,30%,20%,40%。 Now suppose 30% queue is empty - should I redistribute the weight to the other queues? 现在假设30%的队列为空-我应该将权重重新分配给其他队列吗? 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) (我需要一个以前在加权循环调度中在Linux内核或其他平台中完成的实现)

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: 示例:如果30为空,则可以这样近似调整其他值:

10 -> 14.3 10-> 14.3

20 -> 28.6 20-> 28.6

40 -> 57.1 40-> 57.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM