Weighted round robin (WRR) is a network scheduler for data flows, but also used to schedule processes.
Weighted round robin [1] is a generalisation of round-robin scheduling. It serves a set of queues or tasks. Whereas round-robin cycles over the queues or tasks and gives one service opportunity per cycle, weighted round robin offers to each a fixed number of opportunities, as specified by the configured weight which serves to influence the portion of capacity received by each queue or task. In computer networks, a service opportunity is the emission of one packet, if the selected queue is non-empty.
If all packets have the same size, WRR is the simplest approximation of generalized processor sharing (GPS). Several variations of WRR exist. [2] The main ones are the classical WRR, and the interleaved WRR.
WRR is presented in the following as a network scheduler. It can also be used to schedule tasks in a similar way.
A weighted round-robin network scheduler has input queues, . To each queue is associated , a positive integer, called the weight. The WRR scheduler has a cyclic behavior. In each cycle, each queue has emissions opportunities.
The different WRR algorithms differ on the distributions of these opportunities in the cycle.
In classical WRR [2] [3] [4] the scheduler cycles over the queues. When a queue is selected, the scheduler will send packets, up to the emission of packet or the end of queue.
Constant and variables: const N // Nb of queues const weight[1..N] // weight of each queue queues[1..N] // queues i // queue index c // packet counter Instructions:while true dofor i in 1 .. N do c := 0 while (not queue[i].empty) and (c<weight[i]) do send(queue[i].head()) queue[i].dequeue() c:= c+1 |
Let , be the maximum weight. In IWRR, [1] [5] each cycle is split into rounds. A queue with weight can emit one packet at round only if .
Constant and variables: const N // Nb of queues const weight[1..N] // weight of each queue const w_max queues[1..N] // queues i // queue index r // round counter Instructions: while true dofor r in 1 .. w_max dofor i in 1 .. N doif (not queue[i].empty) and (weight[i] >= r) then send(queue[i].head()) queue[i].dequeue() |
Consider a system with three queues and respective weights . Consider a situation where there are 7 packets in the first queue, A,B,C,D,E,F,G, 3 in the second queue, U,V,W and 2 in the third queue X,Y. Assume that there is no more packet arrival.
With classical WRR, in the first cycle, the scheduler first selects and transmits the five packets at head of queue,A,B,C,D,E (since ), then it selects the second queue, , and transmits the two packets at head of queue, U,V (since ), and last it selects the third queue, which has a weight equals to 3 but only two packets, so it transmits X,Y. Immediately after the end of transmission of Y, the second cycle starts, and F,G from are transmitted, followed by W from .
With interleaved WRR, the first cycle is split into 5 rounds (since ). In the first one (r=1), one packet from each queue is sent (A,U,X), in the second round (r=2), another packet from each queue is also sent (B,V,Y), in the third round (r=3), only queues are allowed to send a packet (, and ), but since is empty, only C from is sent, and in the fourth and fifth rounds, only D,E from are sent. Then starts the second cycle, where F,W,G are sent.
Task or process scheduling can be done in WRR in a way similar to packet scheduling: when considering a set of active tasks, they are scheduled in a cyclic way, each task gets quantum or slice of processor time . [6] [7]
Like round-robin, weighted round robin scheduling is simple, easy to implement, work conserving and starvation-free.
When scheduling packets, if all packets have the same size, then WRR and IWRR are an approximation of Generalized processor sharing: [8] a queue will receive a long term part of the bandwidth equals to (if all queues are active) while GPS serves infinitesimal amounts of data from each nonempty queue and offer this part on any interval.
If the queues have packets of variable length, the part of the bandwidth received by each queue depends not only on the weights but also of the packets sizes.
If a mean packets size is known for every queue , each queue will receive a long term part of the bandwidth equals to . If the objective is to give to each queue a portion of link capacity (with ), one may set .
Since IWRR has smaller per class bursts than WRR, it implies smaller worst-case delays. [9]
WRR for network packet scheduling was first proposed by Katevenis, Sidiropoulos and Courcoubetis in 1991, [1] specifically for scheduling in ATM networks using fixed-size packets (cells). 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. In the more general case of IP networks with variable size packets, 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. [1]
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).
Network throughput refers to the rate of message delivery over a communication channel, such as Ethernet or packet radio, in a communication network. The data that these messages contain may be delivered over physical or logical links, or through network nodes. Throughput is usually measured in bits per second, and sometimes in data packets per second or data packets per time slot.
In telecommunications, round-trip delay (RTD) or round-trip time (RTT) is the amount of time it takes for a signal to be sent plus the amount of time it takes for acknowledgement of that signal having been received. This time delay includes propagation times for the paths between the two communication endpoints. In the context of computer networks, the signal is typically a data packet. RTT is commonly used interchangeably with ping time, which can be determined with the ping command. However, ping time may differ from experienced RTT with other protocols since the payload and priority associated with ICMP messages used by ping may differ from that of other traffic.
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.
Round-robin (RR) is one of the algorithms employed by process and network schedulers in computing. As the term is generally used, time slices are assigned to each process in equal portions and in circular order, handling all processes without priority. Round-robin scheduling is simple, easy to implement, and starvation-free. Round-robin scheduling can be applied to other scheduling problems, such as data packet scheduling in computer networks. It is an operating system concept.
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.
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 and fair algorithm.
In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u,v) from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. Precisely, a topological sort is a graph traversal in which each node v is visited only after all its dependencies are visited. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time. Topological sorting has many applications, especially in ranking problems such as feedback arc set. Topological sorting is possible even when the DAG has disconnected components.
The token bucket is an algorithm used in packet-switched and telecommunications networks. It can be used to check that data transmissions, in the form of packets, conform to defined limits on bandwidth and burstiness. It can also be used as a scheduling algorithm to determine the timing of transmissions that will comply with the limits set for the bandwidth and burstiness: see network scheduler.
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.
Weighted random early detection (WRED) is a queueing discipline for a network scheduler suited for congestion avoidance. It is an extension to random early detection (RED) where a single queue may have several different sets of queue thresholds. Each threshold set is associated to a particular traffic class.
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).
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.
The #P-completeness of 01-permanent, sometimes known as Valiant's theorem, is a mathematical proof about the permanent of matrices, considered a seminal result in computational complexity theory. In a 1979 scholarly paper, Leslie Valiant proved that the computational problem of computing the permanent of a matrix is #P-hard, even if the matrix is restricted to have entries that are all 0 or 1. In this restricted case, computing the permanent is even #P-complete, because it corresponds to the #P problem of counting the number of permutation matrices one can get by changing ones into zeroes.
Reservoir sampling is a family of randomized algorithms for choosing a simple random sample, without replacement, of k items from a population of unknown size n in a single pass over the items. The size of the population n is not known to the algorithm and is typically too large for all n items to fit into main memory. The population is revealed to the algorithm over time, and the algorithm cannot look back at previous items. At any point, the current state of the algorithm must permit extraction of a simple random sample without replacement of size k over the part of the population seen so far.
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.
Time-Sensitive Networking (TSN) is a set of standards under development by the Time-Sensitive Networking task group of the IEEE 802.1 working group. The TSN task group was formed in November 2012 by renaming the existing Audio Video Bridging Task Group and continuing its work. The name changed as a result of the extension of the working area of the standardization group. The standards define mechanisms for the time-sensitive transmission of data over deterministic Ethernet networks.
Round robin is a procedure for fair item allocation. It can be used to allocate several indivisible items among several people, such that the allocation is "almost" envy-free: each agent believes that the bundle they received is at least as good as the bundle of any other agent, when at most one item is removed from the other bundle. In sports, the round-robin procedure is called a draft.