Weighted round robin

Weighted round robin (WRR) is a network scheduling discipline.[1] Each packet flow or connection has its own packet queue in a network interface controller. 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. The number of packets served is in proportion to the assigned weight and in inverse proportion to the size of the packets.

Algorithm

In WRR queuing packets are first classified into various service classes such as: real time, interactive and file transfer, and then assigned to a queue that is specifically dedicate to that service class. Each of the queues is serviced in a round robin order. Similar to "strict PQ"??? and FQ - empty queues are skipped. WRR queuing is also referred to as CBQ or custom queuing.[2]

WRR queuing supports the allocation of different amounts of bandwidth to different service class by either:

  • Allowing higher-bandwidth queues to send more than a single packet each time that they are visited during a service round.
  • Allowing each queue to send only a single packet each time that it is visited, but to visit higher-bandwidth queues multiple times in a single service round.

WRR mechanism (pseudo-code):

// calculate number of packets to be served each round by connections

for each flow f
   f.normalized_weight = f.weight / f.mean_packet_size

min = findSmallestNormalizedWeight

for each flow f
   f.packets_to_be_served = f.normalized_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

Limitations and Improvements

WRR for network packet scheduling was first proposed by Katevenis, Sidiropoulos and Courcoubetis in 1991, specifically for scheduling in ATM networks using fixed size packets (cells). In the more general case of IP networks with variable size packets, in order to approximate GPS the weight factors must be adjusted based on the packet size. That requires estimation of the average packet size, which makes a good GPS approximation hard to achieve in practice with WRR.[3] The primary limitation of weighted round-robin queuing is that it provides the correct percentage of bandwidth to each service class only if all the packets in all the queues are the same size or when the mean packet size is known in advance.

Deficit round robin is a later variation of WRR that achieves better GPS approximation without knowing the mean packet size of each connection in advance. More effective scheduling disciplines were also introduced which handle the limitations mentioned above (e.g. weighted fair queuing).

References

  1. "Proxies Knowledge Base : Home Page". rev.proxies.online. Retrieved 2017-05-16.
  2. Semeria, Chuck. "Supporting Differentiated Service Classes: Queue Scheduling Disciplines" (PDF).
  3. Katevenis, Manolis; Sidiropoulos, Stefanos; Courcoubetis, Costas (1 October 1991). "Weighted round-robin cell multiplexing in a general-purpose ATM switch chip". IEEE Journal on Selected Areas in Communications. 9 (8): 1265–1279. doi:10.1109/49.105173. ISSN 0733-8716.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.