Deficit round robin

Last updated

Deficit Round Robin (DRR), also Deficit Weighted Round Robin (DWRR), is a scheduling algorithm for the network scheduler. DRR is, like weighted fair queuing (WFQ), a packet-based implementation of the ideal Generalized Processor Sharing (GPS) policy. It was proposed by M. Shreedhar and G. Varghese in 1995 as an efficient (with O(1) complexity) and fair algorithm. [1]

Contents

Details

In DRR, a scheduler handling N flows [lower-alpha 1] is configured with one quantum for each flow. This global idea is that, at each round, the flow can send at most bytes, and the remaining, if any, is reported to the next round. In this way, the minimum rate that flow will achieve over a long term is ; where is the link rate.

Algorithm

The DRR scans all non-empty queues in sequence. When a non-empty queue is selected, its deficit counter is incremented by its quantum value. Then, the value of the deficit counter is a maximal number of bytes that can be sent at this turn: if the deficit counter is greater than the packet's size at the head of the queue (HoQ), this packet can be sent, and the value of the counter is decremented by the packet size. Then, the size of the next packet is compared to the counter value, etc. Once the queue is empty or the value of the counter is insufficient, the scheduler will skip to the next queue. If the queue is empty, the value of the deficit counter is reset to 0.

Variables and Constants     const integer N             // Nb of queues     const integer Q[1..N]       // Per queue quantum      integer DC[1..N]            // Per queue deficit counter     queue queue[1..N]           // The queues
Scheduling Loopwhile true dofor i in 1..N doif not queue[i].empty() then             DC[i]:= DC[i] + Q[i]             while( not queue[i].empty() and                          DC[i] ≥ queue[i].head().size() ) do                 DC[i] := DC[i] − queue[i].head().size()                 send( queue[i].head() )                 queue[i].dequeue()             end whileif queue[i].empty() then                 DC[i] := 0             end ifend ifend forend while

Performances: fairness, complexity, and latency

Like other GPS-like scheduling algorithm, the choice of the weights is left to the network administrator.

Like WFQ, DRR offers a minimal rate to each flow whatever the size of the packets is. In weighted round robin scheduling, the fraction of bandwidth used depend on the packet's sizes.

Compared with WFQ scheduler that has complexity of O(log(n)) (n is the number of active flows/queues), the complexity of DRR is O(1), if the quantum is larger than the maximum packet size of this flow. Nevertheless, this efficiency has a cost: the latency, i.e., the distance to the ideal GPS, is larger in DRR than in WFQ. [2] More on the worst-case latencies can be found here. [3]

Implementations

An implementation of the deficit round robin algorithm was written by Patrick McHardy for the Linux kernel [4] and published under the GNU General Public License.

In Cisco and Juniper routers, modified versions of DRR are implemented: since the latency of DRR can be larger for some class of traffic, these modified versions give higher priority to some queues, whereas the others are served with the standard DRR algorithm. [5] [6]

See also

Notes

  1. Flows may also be called queues, classes or sessions

Related Research Articles

In computing, scheduling is the action of assigning resources to perform tasks. The resources may be processors, network links or expansion cards. The tasks may be threads, processes or data flows.

{{Use American English|date=August 2022

Network congestion in data networking and queueing theory is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle. Typical effects include queueing delay, packet loss or the blocking of new connections. A consequence of congestion is that an incremental increase in offered load leads either only to a small increase or even a decrease in network throughput.

Weighted round robin (WRR) is a network scheduler for data flows, but also used to schedule processes.

FAST TCP is a TCP congestion avoidance algorithm especially targeted at long-distance, high latency links, developed at the Netlab, California Institute of Technology and now being commercialized by FastSoft. FastSoft was acquired by Akamai Technologies in 2012.

<span class="mw-page-title-main">Leaky bucket</span> Network traffic shaping and policing algorithm

The leaky bucket is an algorithm based on an analogy of how a bucket with a constant leak will overflow if either the average rate at which water is poured in exceeds the rate at which the bucket leaks or if more water than the capacity of the bucket is poured in all at once. It can be used to determine whether some sequence of discrete events conforms to defined limits on their average and peak rates or frequencies, e.g. to limit the actions associated with these events to these rates or delay them until they do conform to the rates. It may also be used to check conformance or limit to an average rate alone, i.e. remove any variation from the average.

<span class="mw-page-title-main">Random early detection</span> Algorithm

Random early detection (RED), also known as random early discard or random early drop, is a queuing discipline for a network scheduler suited for congestion avoidance.

Generalized processor sharing (GPS) is an ideal scheduling algorithm for process schedulers and network schedulers. It is related to the fair-queuing principle which groups packets into classes and shares the service capacity between them. GPS shares this capacity according to some fixed weights.

In computer science, an input queue is a collection of processes in storage that are waiting to be brought into memory to run a program. Input queues are mainly used in Operating System Scheduling which is a technique for distributing resources among processes. Input queues not only apply to operating systems (OS), but may also be applied to scheduling inside networking devices. The purpose of scheduling is to ensure resources are being distributed fairly and effectively; therefore, it improves the performance of the system.

Proportional-fair scheduling is a compromise-based scheduling algorithm. It is based upon maintaining a balance between two competing interests: Trying to maximize the total throughput of the network while at the same time allowing all users at least a minimal level of service. This is done by assigning each data flow a data rate or a scheduling priority that is inversely proportional to its anticipated resource consumption.

Network calculus is "a set of mathematical results which give insights into man-made systems such as concurrent programs, digital circuits and communication networks." Network calculus gives a theoretical framework for analysing performance guarantees in computer networks. As traffic flows through a network it is subject to constraints imposed by the system components, for example:

Fair queuing is a family of scheduling algorithms used in some process and network schedulers. The algorithm is designed to achieve fairness when a limited resource is shared, for example to prevent flows with large packets or processes that generate small jobs from consuming more throughput or CPU time than other flows or processes.

Bandwidth management is the process of measuring and controlling the communications on a network link, to avoid filling the link to capacity or overfilling the link, which would result in network congestion and poor performance of the network. Bandwidth is described by bit rate and measured in units of bits per second (bit/s) or bytes per second (B/s).

In routers and switches, active queue management (AQM) is the policy of dropping packets inside a buffer associated with a network interface controller (NIC) before that buffer becomes full, often with the goal of reducing network congestion or improving end-to-end latency. This task is performed by the network scheduler, which for this purpose uses various algorithms such as random early detection (RED), Explicit Congestion Notification (ECN), or controlled delay (CoDel). RFC 7567 recommends active queue management as a best practice.

Weighted fair queueing (WFQ) is a network scheduling algorithm. WFQ is both a packet-based implementation of the generalized processor sharing (GPS) policy, and a natural extension of fair queuing (FQ). Whereas FQ shares the link's capacity in equal subparts, WFQ allows schedulers to specify, for each flow, which fraction of the capacity will be given.

Low-latency queuing (LLQ) is a network scheduling feature developed by Cisco to bring strict priority queuing (PQ) to class-based weighted fair queuing (CBWFQ). LLQ allows delay-sensitive data to be given preferential treatment over other traffic by letting the data to be dequeued and sent first.

Bufferbloat is a cause of high latency and jitter in packet-switched networks caused by excess buffering of packets. Bufferbloat can also cause packet delay variation, as well as reduce the overall network throughput. When a router or switch is configured to use excessively large buffers, even very high-speed networks can become practically unusable for many interactive applications like voice over IP (VoIP), audio streaming, online gaming, and even ordinary web browsing.

In queueing theory, a discipline within the mathematical theory of probability, the backpressure routing algorithm is a method for directing traffic around a queueing network that achieves maximum network throughput, which is established using concepts of Lyapunov drift. Backpressure routing considers the situation where each job can visit multiple service nodes in the network. It is an extension of max-weight scheduling where each job visits only a single service node.

<span class="mw-page-title-main">Network scheduler</span> Arbiter on a node in packet switching communication network

A network scheduler, also called packet scheduler, queueing discipline (qdisc) or queueing algorithm, is an arbiter on a node in a packet switching communication network. It manages the sequence of network packets in the transmit and receive queues of the protocol stack and network interface controller. There are several network schedulers available for the different operating systems, that implement many of the existing network scheduling algorithms.

Enhanced Transmission Selection (ETS) is a network scheduler scheduling algorithm that has been defined by the Data Center Bridging Task Group of the IEEE 802.1 Working Group. It is a hierarchical scheduler that combines static priority scheduling and a bandwidth sharing algorithms.

References

  1. Shreedhar, M.; Varghese, G. (October 1995). "Efficient fair queueing using deficit round robin". ACM SIGCOMM Computer Communication Review. 25 (4): 231. doi:10.1145/217391.217453. ISSN   0146-4833.
  2. Lenzini, L.; Mingozzi, E.; Stea, G. (2002). "Aliquem: A novel DRR implementation to achieve better latency and fairness at O(1) complexity". IEEE 2002 Tenth IEEE International Workshop on Quality of Service (Cat. No.02EX564). pp. 77–86. doi:10.1109/IWQoS.2002.1006576. ISBN   978-0-7803-7426-3. S2CID   62158653.
  3. Tabatabaee, Seyed Mohammadhossein; Le Boudec, Jean-Yves (May 2021). "Deficit Round-Robin: A Second Network Calculus Analysis". 2021 IEEE 27th Real-Time and Embedded Technology and Applications Symposium (RTAS) (PDF). Nashville, TN, USA: IEEE. pp. 171–183. doi:10.1109/RTAS52030.2021.00022. ISBN   978-1-6654-0386-3. S2CID   235294011.
  4. "DRR Linux kernel network scheduler module". kernel.org . Retrieved 2013-09-07.
  5. Lenzini, Luciano; Mingozzi, Enzo; Stea, Giovanni (2007). "Performance Analysis of Modified Deficit Round Robin Schedulers". IOS Journal of High Speed Networks. 16 (4): 399–422.
  6. Lenzini, Luciano; Mingozzi, Enzo; Stea, Giovanni (2006). Performance Analysis of Modified Deficit Round Robin Schedulers (Technical report). Dipartimento di Ingegneria della Informazione, University of Pisa.