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.

Slides:



Advertisements
Similar presentations
CS 268: Packet Scheduling Ion Stoica March 18/20, 2003.
Advertisements

1 Comnet 2010 Communication Networks Recitation 4 Scheduling & Drop Policies.
1 CNPA B Nasser S. Abouzakhar Queuing Disciplines Week 8 – Lecture 2 16 th November, 2009.
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.
Abhay.K.Parekh and Robert G.Gallager Laboratory for Information and Decision Systems Massachusetts Institute of Technology IEEE INFOCOM 1992.
Courtesy: Nick McKeown, Stanford 1 Intro to Quality of Service Tahir Azim.
CS 268: Lecture 8 Router Support for Congestion Control Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
CS 4700 / CS 5700 Network Fundamentals Lecture 12: Router-Aided Congestion Control (Drop it like it’s hot) Revised 3/18/13.
Analysis and Simulation of a Fair Queueing Algorithm A. Demers, S. keshav, and S. Shenker Wireless/Mobile Network Lab 임상택.
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.
Networking Issues in LAN Telephony Brian Yang
Generalized Processing Sharing (GPS) Is work conserving Is a fluid model Service Guarantee –GPS discipline can provide an end-to-end bounded- delay service.
Service Disciplines for Guaranteed Performance Service Hui Zhang, “Service Disciplines for Guaranteed Performance Service in Packet-Switching Networks,”
EE689 Lecture 5 Review of last lecture More on HPF RED.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
Congestion Control and Resource Allocation
תזכורת  שבוע הבא אין הרצאה m יום א, נובמבר 15, 2009  שיעור השלמה m יום שישי, דצמבר 11, 2009 Lecture 4: Nov 8, 2009 # 1.
CS 268: Lecture 8 (Router Support for Congestion Control) Ion Stoica February 19, 2002.
ACN: Congestion Control1 Congestion Control and Resource Allocation.
Computer Networking Lecture 17 – Queue Management As usual: Thanks to Srini Seshan and Dave Anderson.
Lecture 4#-1 Scheduling: Buffer Management. Lecture 4#-2 The setting.
CSc 461/561 CSc 461/561 Multimedia Systems Part C: 3. QoS.
7/15/2015HY220: Ιάκωβος Μαυροειδής1 HY220 Schedulers.
CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address will match which entry? a /8.
Packet Scheduling From Ion Stoica. 2 Packet Scheduling  Decide when and what packet to send on output link -Usually implemented at output interface 1.
A Generalized Processor Sharing Approach to Flow Control in Integrated Services Networks: The Single-Node Case Abhay K. Parekh, Member, IEEE, and Robert.
CIS679: Scheduling, Resource Configuration and Admission Control r Review of Last lecture r Scheduling r Resource configuration r Admission control.
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.
CONGESTION CONTROL and RESOURCE ALLOCATION. Definition Resource Allocation : Process by which network elements try to meet the competing demands that.
Advance Computer Networking L-5 TCP & Routers Acknowledgments: Lecture slides are from the graduate level Computer Networks course thought by Srinivasan.
Link Scheduling & Queuing COS 461: Computer Networks
Fair Queueing. 2 First-Come-First Served (FIFO) Packets are transmitted in the order of their arrival Advantage: –Very simple to implement Disadvantage:
Packet Scheduling and Buffer Management Switches S.Keshav: “ An Engineering Approach to Networking”
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
Nick McKeown Spring 2012 Lecture 2,3 Output Queueing EE384x Packet Switch Architectures.
Packet Scheduling: SCFQ, STFQ, WF2Q Yongho Seok Contents Review: GPS, PGPS SCFQ( Self-clocked fair queuing ) STFQ( Start time fair queuing ) WF2Q( Worst-case.
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.
048866: Packet Switch Architectures
Lecture Note on Scheduling Algorithms. What is scheduling? A scheduling discipline resolves contention, “who is the next?” Goal: fairness and latency.
1 Fair Queuing Hamed Khanmirza Principles of Network University of Tehran.
Queue Scheduling Disciplines
Spring Computer Networks1 Congestion Control Sections 6.1 – 6.4 Outline Preliminaries Queuing Discipline Reacting to Congestion Avoiding Congestion.
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.
CS244 Packet Scheduling (Generalized Processor Sharing) Some slides created by: Ion Stoica and Mohammad Alizadeh
04/02/08 1 Packet Scheduling IT610 Prof. A. Sahoo KReSIT.
QoS & Queuing Theory CS352.
EE 122: Router Support for Congestion Control: RED and Fair Queueing
TCP, XCP and Fair Queueing
Fair Queueing.
EE384x: Packet Switch Architectures
Computer Science Division
Variations of Weighted Fair Queueing
COMP/ELEC 429 Introduction to Computer Networks
Congestion Control Reasons:
Introduction to Packet Scheduling
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
Fair Queueing.
A Simple QoS Packet Scheduler for Network Routers
Introduction to Packet Scheduling
کنترل جریان امیدرضا معروضی.
Presentation transcript:

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 Select the next packet for transmission Arbitrator Classifier

Packet Scheduling ? Scheduler flow 1 flow 2 flow n Buffer management Packet storage decision (when to drop) Packet transmission decision (packet to send ) –desired transmission time ? QoS? smallest one first? –Schedulers differ in how they compute desired transmission times Controls the interaction among –Traffic in the same class –Traffic in the different QoS required classes –Traffic in the admin. purpose class

Characteristics of Scheduling algorithm Basic properties – How to isolate flow? to guarantee service to one flow independent of the behavior of other flow – How to support of excess traffic and fairness? Work conserving? If you send more than you are entitled to but resources are available, can you take advantage of it and if yes, how much – How complex it is? Computation complexity, management complexity – How efficient it is? # flows, packets?

Known scheduling ! FIFO, LIFO Fair Queueing – Min-Max – bit-by-bit round robin – Weighted bit-by-bit Fair Queueing (WFQ) – WFQ in a fluid flow system  Generalized Processor Sharing (GPS) Packetized FQ(PGPS)

First-Come First-Served Algorithm: – Packets are served in the order they arrive Departure time is arrival time plus time to empty buffer content First packet comes first packet out, – Properties Very simple to implement No flow isolation or bandwidth guarantees –One flow can hog the entire link if unconstrained Max delay is proportional to buffer size, not packet class

Priority Queuing Multiple FCFS queues, where high priority queues always transmit before lower priority ones – Departure time is time of arrival plus time to empty buffer content plus variable time (function of buffer content and arrivals in higher priority queues) – Class i is guaranteed to have better delay than class j for i<j – Lower priority classes can be starved – Remains simple to implement (for few classes)

Round-Robin Packets are classified and sent to “ n ” queues – Queues are serviced in order 0..n-1 Problems – Can ’ t offer bandwidth or delay guarantees – Packets can “ park ” in a queue, while empty queues are checked for servicing – Insensitive to packet size (inherently unfair) Scheduler flow 1 flow 2 flow n Buffer management

Weighted Round-Robin – Windowed Priority Queuing Each flow has its own queue and weight w i Packets sent to “ n ” queues, like Priority Queuing Server visits each queue in turn and transmits w i packets (bits) – Limited number of packets processed per queue per servicing round w i packets for each of the “ i ” queues w1w1 w2w2 w3w3 w4w4 w i = i Scheduler flow 1 flow 2 flow n Buffer management

FIFO Scheduling Serving in the Queueing system? server Time

FIFO Scheduling Is it fair? server Time Flow i #of served packets average Flow i Delay average FIFO favors the most greedy flowFIFO is hard to control the delay

Fair Queueing? Can provide (QOS) – Fairness: Make sure that a given flow gets enough transmission opportunities when it has packets waiting to be transmitted (is backlogged) – Delay: Ensure upper bound on the maximum (average) amount of time a packet can wait in the buffer – Jitter: Provide bound on the delay difference of consecutive packet transmissions (for the same flow) – Loss: is a function of Buffer management Distribution of excess bandwidth (E) across active sessions – Fair allocation gives each one of N active connections E/N+reserved BW

Example Mb/s 10 Mb/s 100 Mb/s A B R1R1 C 0.55 Mb/s 0.55 Mb/s What is the “fair” allocation: (0.55Mb/s, 0.55Mb/s) or (1Mb/s, 0.1Mb/s)? e.g. an http flow with a given (IP SA, IP DA, TCP SP, TCP DP)

Example Mb/s 10 Mb/s 100 Mb/s A B R1R1 D What is the “fair” allocation? 0.2 Mb/s C ? Mb/s ? Mb/s

Max-Min Fairness How can an Internet router “ allocate ” different rates to different flows? First, let ’ s see how a router can allocate the “same” rate to different flows … -> Max-Min Fairness Algorithm

Max-Min Fairness Algorithm A common way to allocate flows N flows share a link of rate C. Flow f wishes to send at rate W(f), and is allocated rate R(f). 1. Pick the flow, f, with the smallest requested rate. 2. If W(f) < C/N, then set R(f) = W(f). 3. If W(f) > C/N, then set R(f) = C/N. 4. Set N = N – 1. C = C – R(f). 5. If N>0 goto 1.

Max-Min fairness Example 1 Round 1: Since W(f 1 )<1.1/3(0.366), then Set R(f 1 ) = 0.2 Round 2: Since W(f 2 )>0.9/2(0.45), then Set R(f 2 ) = 0.9/2 = 0.45 Round 3: Since W(f 3 )>0.45/1(0.45), then Set R(f 4 ) = 0.45/1 = 0.45 The smallest flow in the round W(f 1 ) = 0.2 W(f 3 ) = 100 W(f 2 ) = 10 3 flows share a link of rate 1.1Mbps. Flow f wishes to send at rate W(f), and is allocated rate R(f). C=1.1Mbps, N=3 Sorted list C=1.1

Max-Min Fairness Example 2 Another example Round 1: Since W(f 1 )<1/4(0.25), then Set R(f 1 ) = 0.1 Round 2: Since W(f 2 )>0.9/3(0.3), then Set R(f 2 ) = 0.9/3 = 0.3 Round 3: Since W(f 4 )>0.6/2(0.3), then Set R(f 4 ) = 0.6/2 = 0.3 Round 4: Since W(f 3 )>0.3/1(0.3), then Set R(f 3 ) = 0.3/1 = 0.3 The smallest flow in the round W(f 1 ) = 0.1 W(f 3 ) = 10 W(f 4 ) = 5 W(f 2 ) = flows share a link of rate 1Mbps. Flow f wishes to send at rate W(f), and is allocated rate R(f). C=1Mbps, N=4 Sorted list C=1

Max-Min Fairness Example 3 Another example The smallest flow in the round 3 flows share a link of rate 10Mbps. Flow f wishes to send at rate W(f), and is allocated rate R(f). C=10Mbps, N=3 Sorted list C=10 Round 1: Since W(f 1 )<10/3(3.33), then Set R(f 1 ) = 2 Round 2: Since W(f 2 )>8/2(4), then Set R(f 2 ) = 8/2 = 4 Round 3: Since W(f 3 )>4/1(4), then Set R(f 4 ) = 4/1 = 4 R ( 8) = 4 R(6) = 4 R(2) = 2 Max-Min fairness

Bit-by-Bit Fair Queueing 1. Packets belonging to a flow are placed in a FIFO. This is called “ per-flow queueing ”. 2. FIFOs are scheduled one bit at a time, in a round-robin fashion. 3. This is called Bit-by-Bit Fair Queueing. Flow 1 Flow N ClassificationScheduling Bit-by-bit round robin Order of service … …f 1, f 2, f 3, f 4, f 5, f 6, …f N …, f 1,…

Weighted Bit-by-Bit Fair Queueing Likewise, flows can be allocated different rates by servicing a different number of bits for each flow during each round. 10 R(f 1 ) = 1 R(f 3 ) = 3 R1R1 C R(f 4 ) = 3 R(f 2 ) = 3 Order of service for the four queues: … f 1, f 2, f 2, f 2, f 3, f 3, f 3, f 4, f 4, f 4, f 1,… Also called “Generalized Processor Sharing (GPS)”

R(f): Fair Rate Computation Example Associate a weight w i with each flow i If link congested, compute R(f) such that R(f i )= R(8) = 6 R(6) = 2 R(2) = 2 10 ( w 1 = 3) ( w 2 = 1) ( w 3 = 1) The smallest flow in the round Round 1: Since W(f 1 )<10/5(2), then Set R(f 1 ) = 2 Round 2: Since W(f 2 )>8/4(2), then Set R(f 2 ) = 8/4 = 2 Round 3: Since W(f 3 )>6/1(6), then Set R(f 4 ) = 6/1 = 6

Generalized Processor Share-fluid flow FQ Red session has packets backlogged between time 0 and 10 Other sessions have packets continuously backlogged flows Link=C 5C/  w i 1C/  w i

Generalized Processor Sharing A work conserving GPS is defined as where – w i – weight of flow i – W i (t 1, t 2 ) – total service received by flow i during [t 1, t 2 ) – W(t 1, t 2 ) – total service allocated to all flows during [t 1, t 2 ) – B(t) – number of flows backlogged

GPS Example OUT 6 14 ? ? ? 1 ( w 1 = 1/2) ( w 2 = 1/3) ( w 3 = 1/6) r 3 =1/3 r 2 =2/3 1/2 1/3 1/6 t dtdt2 w 2 = 1/3 w 1 = 1/2 w 3 = 1/6 IN dtdt2

GPS Example Three flows with weights/rates w 1 =1/2, w 2 =1/3, w 3 =1/6 Initially, only flows 2 and 3 are active (dt) Flows 1, 2, and 3 are ultimately active (dt2) OUT r 3 =1/3 t dt r 2 =2/3 1/2 1/3 1/6 dt2

27 Properties of GPS End-to-end delay bounds for guaranteed service [Parekh and Gallager ‘ 93] Fair allocation of bandwidth for best effort service [Demers et al. ‘ 89, Parekh and Gallager ‘ 92] Work-conserving for high link utilization

Summary of Fluid Flow Fair Queueing In a fluid flow system FQ reduces to bit-by-bit round robin among flows – Each flow receives R(f i ), where f i – flow arrival rate Weighted bit-by-bit Fair Queueing (WFQ) – associate a weight with each flow [Demers and etc. ’ 89] – In a fluid flow system it reduces to bit-by-bit round robin WFQ in a fluid flow system  Generalized Processor Sharing (GPS) [Parekh & Gallager ’ 92]

Packet vs. Fluid System GPS is defined in an idealized fluid flow model – Multiple queues can be serviced simultaneously – No non-preemption unit (preemptive) Real system are packet systems – One queue is served at any given time – Packet transmission is not preempted Goal – Define packet algorithms approximating the fluid system – Maintain most of the important properties

Standard techniques of approximating fluid GPS – Select packet that finishes first in GPS (assuming that there are no future arrivals) Important properties of GPS – Finishing order of packets currently in system independent of future arrivals Implementation based on virtual time – Assign virtual finish time to each packet upon arrival – Packets served in increasing order of virtual times Packet Approximation of Fluid System

Packetized GPS Algorithm Problem: We need to serve a whole packet at a time. Solution: 1. Determine what time a packet, p, would complete if we served flows bit-by-bit. Call this the packet ’ s finishing time, F(p). 2. Serve packets in the order of increasing finishing time. Theorem: Packet p will depart before F(p) + Tr max “Packetized Generalized Processor Sharing (PGPS)”

From Fluid to Packets Deviation : the fluid model (GPS) vs.(PGPS=WFQ) How to minimize it? – Cannot interrupt packet transmission once started Granularity in how transmission opportunities are allocated Inability to change decision even if higher priority (allocated rate) packets arrive Approach – Emulate the fluid system (GPS) as closely as possible Desired transmission time is finish transmission time in fluid system Select packet with smallest finish transmission time in the fluid system (assuming there would be no more arrivals after this time)

Approximating GPS with WFQ Fluid GPS system service order (ideal) PGPS (also called Weighted Fair Queueing) – select the first packet that finishes in GPS (service order) Virtual Finish time ,7,…

Packetized GPS (Weighted Fair Queueing) flow 1 flow 2. flow n C buffer GPS emulator that determines virtual departure times (VDT) of packets arrival times and packet lengths VDTs of packets Packets are transmitted in order of their VDTs

time Cumulative bytes A(t) D(t) R B(t) Deterministic analysis of a router queue FIFO delay, d(t) R A(t)D(t) Model of router buffer B(t) D(t): Service process A(t): Arrival process

Assume same packet size If arrived and queue is available enque Else drop At every tick, if queue is not empty deque and send it Example 25MBs computer and network Router 2MBs in steady state If IMB burst (40msec), AveRate = 2MB Rho = 2MB/s C = 1MB 25MB in 40msec Capacity 250KB Allow token for 2MB/sec

Want to speedup when large burst comes Token/DeltaT Save token in idle upto n Never discard packet-regulate host

Token capacity = 250KB Token arrives at the rate of 2MB/sec Assume token is full when 1MB burst arrives 40ms? NO C+rhoS= MS S = C/(M-rho) 250KB/(25MB/sec-2MB/sec) 250/(23)sec is about 11sec

Resource Resrvation Packet Scheduling And Integrated Service

BGP – The Exterior Gateway Routing Protocol