- Weighted round robin
Weighted round robin (WRR) is a
best-effort connectionscheduling discipline . Each packet flow or connection has its own packet queue in a network interface card. It is the simplest emulation of generalized processor sharing (GPS) discipline. While GPS serves infinitesimal amount of data from each nonempty queue, WRR serves a number of packets for each nonempty queue (number = normalized(weight / mean packet size) ).To obtain normalized set of weights a mean packet size must be known. Only then WRR correctly emulates GPS. It is best to know this parameter in advance. But that's really uncommon in
IP network s so it has to be estimated which may be in practice quite hard (in terms of good GPS approximation). Another problem with WRR is that in a scale of one round WRR doesn't providefair link sharing .WRR mechanism (pseudo-code):
//calculate number of packets to be served each round by connections min = find smallest weight for each flow f f.packets_to_be_served = f.weight / min // main loop loop for each non-empty flow queue f min(f.packets_to_be_served, f.packets_waiting).times do servePacket f.getPacket
There's a modified version of WRR called deficit round robin (DRR) which is able to properly handle packets of different size without knowing their mean size of each connection in advance.
There are more effective scheduling disciplines which handles both of these problems mentioned above (e.g. weighted fair queuing (WFQ)).
ee also
*
scheduling discipline
* [http://neosmart.net/blog/2008/weighted-round-robin-dns-solutions/ A simple explanation of weight round-robin distribution]
Wikimedia Foundation. 2010.