Weighted round robin (WRR) is a scheduling discipline. Each packet flow or connection has its own packet queue in a network interface card. It is the simplest approximation of generalized processor sharing (GPS). While GPS serves infinitesimal amounts of data from each nonempty queue, WRR serves a number of packets for each nonempty queue: number = normalized(weight / meanpacketsize).
Algorithm
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
Weaknesses
To obtain a normalized set of weights, required to approximate GPS, a mean packet size must be known. In IP networks with their variable packet size the mean has to be estimated which makes good GPS approximation hard to achieve in practice. Another weakness of WRR is that it cannot guarantee fair link sharing.
deficit round robin (DRR) is a variation of WRR that achieves better GPS approximation without knowing the mean packet size of each connection in advance. There are more effective scheduling disciplines which handle both of these problems mentioned above (e.g. weighted fair queuing (WFQ)).
See also
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




