Packet Scheduling (and QoS)

Slides:



Advertisements
Similar presentations
1 CNPA B Nasser S. Abouzakhar Queuing Disciplines Week 8 – Lecture 2 16 th November, 2009.
Advertisements

1 CONGESTION CONTROL. 2 Congestion Control When one part of the subnet (e.g. one or more routers in an area) becomes overloaded, congestion results. Because.
Network and Communications Hongsik Choi Department of Computer Science Virginia Commonwealth University.
Congestion Control Reasons: - too many packets in the network and not enough buffer space S = rate at which packets are generated R = rate at which receivers.
Real-Time Protocol (RTP) r Provides standard packet format for real-time application r Typically runs over UDP r Specifies header fields below r Payload.
Differentiated Services. Service Differentiation in the Internet Different applications have varying bandwidth, delay, and reliability requirements How.
Worst-case Fair Weighted Fair Queueing (WF²Q) by Jon C.R. Bennett & Hui Zhang Presented by Vitali Greenberg.
Scheduling CS 215 W Keshav Chpt 9 Problem: given N packet streams contending for the same channel, how to schedule pkt transmissions?
CS 268: Lecture 15/16 (Packet Scheduling) Ion Stoica April 8/10, 2002.
Generalized Processing Sharing (GPS) Is work conserving Is a fluid model Service Guarantee –GPS discipline can provide an end-to-end bounded- delay service.
CS 268: Router Design Ion Stoica March 1, 2004.
Service Disciplines for Guaranteed Performance Service Hui Zhang, “Service Disciplines for Guaranteed Performance Service in Packet-Switching Networks,”
Analysis and Simulation of a Fair Queuing Algorithm
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
CSE 401N Multimedia Networking-2 Lecture-19. Improving QOS in IP Networks Thus far: “making the best of best effort” Future: next generation Internet.
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
Packet Scheduling From Ion Stoica. 2 Packet Scheduling  Decide when and what packet to send on output link -Usually implemented at output interface 1.
CIS679: Scheduling, Resource Configuration and Admission Control r Review of Last lecture r Scheduling r Resource configuration r Admission control.
CSE679: QoS Infrastructure to Support Multimedia Communications r Principles r Policing r Scheduling r RSVP r Integrated and Differentiated Services.
CSE QoS in IP. CSE Improving QOS in IP Networks Thus far: “making the best of best effort”
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
Fair Queueing. 2 First-Come-First Served (FIFO) Packets are transmitted in the order of their arrival Advantage: –Very simple to implement Disadvantage:
March 29 Scheduling ?. What is Packet Scheduling? Decide when and what packet to send on output link 1 2 Scheduler flow 1 flow 2 flow n Buffer management.
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 18: Quality of Service Slides used with.
Scheduling Determines which packet gets the resource. Enforces resource allocation to each flows. To be “Fair”, scheduling must: –Keep track of how many.
Scheduling CS 218 Fall 02 - Keshav Chpt 9 Nov 5, 2003 Problem: given N packet streams contending for the same channel, how to schedule pkt transmissions?
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Weighted Fair Queuing Some slides used with.
1 Fair Queuing Hamed Khanmirza Principles of Network University of Tehran.
CSci5221: Packet Scheduling11 Packet Scheduling (and QoS) Packet Scheduling and Queue Management Beyond FIFO: –Class-based Queueing: Priority Queueing,
Providing QoS in IP Networks
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Scheduling for QoS Management. Engineering Internet QoS2 Outline  What is Queue Management and Scheduling?  Goals of scheduling  Fairness (Conservation.
1 Lecture 15 Internet resource allocation and QoS Resource Reservation Protocol Integrated Services Differentiated Services.
04/02/08 1 Packet Scheduling IT610 Prof. A. Sahoo KReSIT.
Advanced Computer Networks
Instructor Materials Chapter 6: Quality of Service
QoS & Queuing Theory CS352.
Topics discussed in this section:
Buffer Management in a Switch
CS 268: Lecture 10 Router Design and Packet Lookup
CS 268: Router Design Ion Stoica February 27, 2003.
Stratified Round Robin: A Low Complexity Packet Scheduler with Bandwidth Fairness and Bounded Delay Sriram Ramabhadran Joseph Pasquale Presented by Sailesh.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 6: Quality of Service Connecting Networks.
CONGESTION CONTROL.
EE 122: Router Support for Congestion Control: RED and Fair Queueing
TCP, XCP and Fair Queueing
Queuing and Queue Management
Quality of Service For Traffic Aggregates
COMP/ELEC 429/556 Introduction to Computer Networks
Variations of Weighted Fair Queueing
Fair Queueing.
EE 122: Quality of Service and Resource Allocation
Scheduling: Buffer Management
Computer Science Division
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Variations of Weighted Fair Queueing
Network Simulation NET441
COMP/ELEC 429 Introduction to Computer Networks
Congestion Control Reasons:
CIS679: Two Planes and Int-Serv Model
Introduction to Packet Scheduling
Real-Time Protocol (RTP)
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
Real-Time Protocol (RTP)
Fair Queueing.
A Simple QoS Packet Scheduler for Network Routers
Introduction to Packet Scheduling
کنترل جریان امیدرضا معروضی.
Presentation transcript:

Packet Scheduling (and QoS) Packet Scheduling and Queue Management Beyond FIFO: Class-based Queueing: Priority Queueing, Round-Robin, etc. Per-Flow Queueing: Weighted Fair Queueing (or Generalized Processor Sharing) Other Active Queue Management (AQM) Schemes Traffic Shaping and Policing Lucky Buckets Optional: Basic QoS Theory -- A Single Node Case fluid model, arrival and service curves bandwidth and delay guarantees CSci5221: Packet Scheduling 1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA 1

Scheduling Policy: FIFO Scheduling: choosing the next packet for transmission on a link can be done following a number of policies FIFO: in order of arrival to the queue; packets that arrive to a full buffer are either discarded, or a discard policy is used to determine which packet to discard among the arrival and those already queued Simplest scheduling policy, default policy CSci5221: Packet Scheduling

CSci5221: Packet Scheduling Beyond FIFO Many applications (e.g., voice, video, on-line gaming, etc.) may have more stringent “quality-of-service” (QoS) or performance requirements We may have give different treatments to packets belonging to different applications (or users) e.g. in an enterprise network, government or military network Examples of QoS requirements or “guarantees” Delay: e.g., all packets of certain type or application will be transmitted within D seconds of their arrival at the router Bandwidth: e.g., all packets of certain type or application will be transmitted with a minimum bandwidth of R bits/s at the router Delay jitter: e.g., the difference or variation in delays of consecutive packets will be larger than V seconds In general, FIFO may not be enough! Or really? CSci5221: Packet Scheduling Spring 2007 3 3

Packet Scheduling: Taxonomy “class-based” vs. “per-flow” Examples: premium, gold and silver services; types of applications “flows”: what is a flow? pre-emptive vs. non-preemptive: non-preemptive: packet currently being transmitted will not be terminated --- assumed in most scheduling algorithms work-conserving vs. non-work-conserving work-conserving: whenever there are packets queued, scheduler will schedule a packet for transmission non-work-conserving: transmission may be idle even there may be packets queued CSci5221: Packet Scheduling 4 4

Examples of Packet Schedulers “Classic” Queueing Mechanisms priority queueing round-robin QoS-oriented Packet Scheduling Algorithms virtual clock fair queueing/weighted fair queueing a.k.a. Generalized Processor Sharing earliest deadline first Other active queue management schemes many developed/proposed to work with TCP and its invariants to provide certain “fairness” properties e.g., RED (Random Early Drop), REM (random early marking), … CSci5221: Packet Scheduling 5 5

Scheduling Policy: Priority Queueing Priority Queuing: classes have different priorities; class may depend on explicit marking or other header info, eg IP source or destination, TCP Port numbers, etc. Transmit a packet from the highest priority class with a non-empty queue Preemptive and non-preemptive versions CSci5221: Packet Scheduling

Scheduling Policy: Round Robin Round Robin: scan class queues serving one from each class that has a non-empty queue Extension: “weighted” round robin CSci5221: Packet Scheduling

Rate Guarantee: Virtual Clock Each flow i is “guaranteed” to service with a bandwidth (i.e., a rate) of ri bits/sec Obviously, ri < C (link capacity or output line speed) Let Pij is the jth packet of flow i, if it arrives at the router at the time aij, and the packet size is Lij assign packet Pij a “time stamp” fij: = max{aij,fi,j-1} + Lij/ri, and schedule the packet at time fij (can we do it !?) This is the “virtual clock” scheduling alg. When can we guarantee that for each flow, it is being served with a rate of ri? Or more precisely, each packet Pij the router by the time fij: = max{aij,fi,j-1} + Lij/ri This is referred to as the schedulability condition! roughly, we must have ri < C ! (i.e, sum of guaranteed rates of all flows < C) CSci5221: Packet Scheduling

Earliest Deadline First (EDF) Each flow is given a (pre-specified) deadline: Deadline for ith flow is: di Let Pij is the jth packet of flow i, if it arrives at the router at the time aij, and the packet size is Lij assign packet Pij a “time stamp” fij: = aij + di, and schedule the packet with the earliest time stamp When can we guarantee that the deadline for each flow is met? Namely, for each flow i, can we guarantee each packet Pij to leave the router by time fij ? fij: = aij + di Schedulability condition? clearly, we have di > Lij /C, where c is link capacity, but this is not sufficient! CSci5221: Packet Scheduling

Scheduling Policy: WFQ Weighted Fair Queuing (WFQ): is a generalized Round Robin (and Virtual Clock) no concept of “round”, no fixed order of serving queues based on “fluid model”: if queue assigned a weight wi, and is served with (a minimum) rate wiC when backlogged (non-empty) C link capacity,  wi =1 if all queues backlogged, each queue served at rate of wiC; otherwise, “spare capacity” proportionally allocated to each backlogged queue (thus the name “fair queueing”!) CSci5221: Packet Scheduling

CSci5221: Packet Scheduling WFQ Implementation Concept of Virtual Time: Packet arrival times of flow i packets: aij; size Lij What would be the finish times of these packets if flow i were served by a dedicated link of Ci= wi C? Let sij be the time packet j of flow i being serviced and fij be the time it finishes transmission for 1st packet: si1 = ai1; f i1 = si1 +Li1/Ci for jth packet: sij = max {aij, fi,j-1 }; fij = sij + Lij/Ci Note that jth packet queued if aij < fi,j-1 aij sij fij Ci “Ideal” dedicated link for flow i CSci5221: Packet Scheduling

Virtual Clock Scheduling Algorithm Virtual Clock: a “first” approximation of WFQ Given N flows, each assigned with weight wi,  wi =1 Calculate the virtual finish time fij of each packet of each flow as if it were served at a rate of Ci =wiC Schedule packets based on fij, i.e., packet with smallest fij among all queued packets is selected for transmission why not scheduled based on sij ? What is the key difference between Virtual Clock and Weighted Fair Queueing WFQ: also know as Generalized Processor Sharing (GPS) CSci5221: Packet Scheduling

WFQ Implementation (cont’d) “Ideal dedicated link” model does not take into account the distribution of “spare capacity” when some queues are empty Need to keep track which queues are backlogged and which are empty Let denote the set of queues backlogged at time t Then for each flow/queue , its actual service rate is which is time-dependent Modification of the “ideal dedicated link model”: sij = max {aij, fi,j-1 }; fij = sij + Lij/Ci(t) Schedule packets based on the (modified) virtual finish time fij What states do we need to maintain to compute fij’s ? CSci5221: Packet Scheduling

Recall: Combined Input-Output Queued (CIOQ) Routers Both input and output interfaces store packets Advantages Easy to built Utilization 1 can be achieved with limited input/output speedup (<= 2) Disadvantages Harder to design algorithms Two congestion points Need to design flow control input interface output interface Backplane C RO Question: can we build CIOQ that emulates any output queuing algorithm? CSci5221: Router Design

Output Queue Emulation using CIOQ (with Speed-up) Stable Marriage Problem -- Gale Shapely Algorithm (GSA) As long as there is a free man m m proposes to highest ranked women w in his list he hasn’t proposed yet If w is free, m and w are engaged If w is engaged to m’ and w prefers m to m’, w releases m’ Otherwise m remains free A stable matching exists for every set of preference lists Complexity: worst-case O(N2) CSci5221: Router Design

Stable Marriage Problem Consider N women and N men Each woman/man ranks each man/woman in the order of their preferences Stable matching, a matching with no blocking pairs Blocking pair; let p(i) denote the pair of i There are matched pairs (k, p(k)) and (j, p(j)) such that k prefers p(j) to p(k), and p(j) prefers k to j GSA in the previous slide: male optimal, female “perssimal” CSci5221: Router Design

Example If men propose to women, the stable matching is 1 2 4 3 1 2 1 4 3 2 3 4 3 2 1 4 1 2 4 3 men pref. list 1 1 4 3 2 2 3 1 4 2 3 1 2 3 4 4 2 1 4 3 women If men propose to women, the stable matching is 1st round: (1,2), (2,1), (3,4), (4,1) -> w1 releases m2 2nd round: (2,4) ->w4 releases m3; 3rd round: (3,3); final match: (1,2), (2,4), (3,3), (4,1) What is the stable matching if women propose to men? CSci5221: Router Design

OQ Emulation with a Speedup of 2 Each input and output maintains a preference list Input preference list: list of cells at that input ordered in the inverse order of their arrival Output preference list: list of all input cells to be forwarded to that output ordered by the times they would be served in an Output Queueing schedule Use GSA to match inputs to outputs Outputs initiate the matching Can emulate all work-conserving schedulers CSci5221: Router Design

Traffic Policing Mechanisms Three criteria: (Long term) Average Rate E.g., 100 packets per second, crucial aspect is the time interval over which rate is measured, as well as the time interval the “long-term” average is defined. Peak Rate: e.g., 100 packets per second on average and 1500 packets per second at maximum (peak) (Max.) Burst Size: Max. number of bytes (or packets) sent “instantaneously” (i.e. over a very short period of time)! CSci5221: Packet Scheduling

Leaky/Token Bucket Mechanism Leaky/Token Bucket mechanism, provides a means for limiting input to specified Burst Size and Average Rate Leaky: when token bucket full, tokens lost CSci5221: Packet Scheduling

Dual Leaky/Token Bucket Limiting input to specified Burst Size  Average Rate  and Peak Rate R one with buffer: token rate r and buffer size b another with “no” buffer: token rate p in practice: needs to be “packetized” - buffer of max. packet size M r tokens/sec b p tokens/sec M min packets CSci5221: Packet Scheduling

Optional Material (for your reference only) Basic QoS Theory --- a Single Node Case CSci5221: Packet Scheduling

Basic QoS Theory: A Single Node Concept of Arrival Curve (or “arrival envelope”) Examples of arrival curves: a constant bit rate flow: a <r,b>-leaky-bucket-policed flow: a dual-leaky-bucket-policed flow: where p is the peak rate, M is the max. pkt size What does this equation intuitively mean? CSci5221: Packet Scheduling

Illustration of Arrival Curve Arrival curve – maximum amount of bits transmitted during an interval of time Δt Δt bits Arrival curve time bps bits Arrival curve time bps 1 2 3 4 5 (R=2,b=1,r=1) Δt CSci5221: Packet Scheduling

CSci5221: Packet Scheduling Service Curve Concept of Service Curve Let a link (or rather a scheduler) as a “server” S y(t): cumulative amount of traffic (in bits) of a flow leaving scheduler S by time t (>=0) y(t) flow x(t) S What does this equation intuitively mean? CSci5221: Packet Scheduling

Service Curve: Example A fixed delay server (defined in IETF IntServ) For a flow with a bandwidth reservation R at a router, IETF IntServ (will be discussed later) assumes a router S will guarantee a service curve  of the following form: where T represents the packetization and other processing delay incurred by router S in processing packets of the flow bps bits Arrival curve R T time Δt CSci5221: Packet Scheduling

Backlog and Delay Bounds t bits arrival curve  service curve  ^ w ( ) d CSci5221: Packet Scheduling

Backlog & Delay Bounds: Example given arrival curve : and service curve Then bits slope r arrival curve  slope p M b T slope R wmax dmax service curve b t and CSci5221: Packet Scheduling

QoS Guarantees: A Single Node Each flow i: traffic characterized/policed by dual leaky-bucket traffic policer: i(t) = min { rit+bi, pit+Mi} Given a router with link capacity C uses WFQ + dual-leaky bucket traffic shaper for each flow allocate bandwidth Ri > ri (thus wi: = Ri/ C) and buffer space Bi for each flow i U he previous formula, we can guarantee each flow i a maximum delay bound of Di = dmax (with b, p, R replaced by bi, pi, Ri) and no loss if Bi >= wmax for each flow i CSci5221: Packet Scheduling