CS244 Packet Scheduling (Generalized Processor Sharing) Some slides created by: Ion Stoica and Mohammad Alizadeh

Slides:



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

Fair Queueing. Design space Buffer management: –RED, Drop-Tail, etc. Scheduling: which flow to service at a given time –FIFO –Fair Queueing.
Deficit Round Robin Scheduler. Outline Introduction Ordinary Problems Deficit Round Robin Latency of DRR Improvement of latencies.
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 임상택.
# 1 Scheduling: Buffer Management. # 2 The setting.
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.
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.
תזכורת  שבוע הבא אין הרצאה 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.
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.
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.
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.
Fair Queueing. 2 First-Come-First Served (FIFO) Packets are transmitted in the order of their arrival Advantage: –Very simple to implement Disadvantage:
Queueing and Scheduling Traffic is moved by connecting end-systems to switches, and switches to each other Traffic is moved by connecting end-systems to.
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.
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.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Real-Time Networks – WAN Packet Scheduling.
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.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 17 – Multimedia Transport Subsystem (Part 3) Klara Nahrstedt Spring 2011.
04/02/08 1 Packet Scheduling IT610 Prof. A. Sahoo KReSIT.
QoS & Queuing Theory CS352.
Chapter 6 Queuing Disciplines
Stratified Round Robin: A Low Complexity Packet Scheduler with Bandwidth Fairness and Bounded Delay Sriram Ramabhadran Joseph Pasquale Presented by Sailesh.
TCP, XCP and Fair Queueing
Quality of Service For Traffic Aggregates
COMP/ELEC 429/556 Introduction to Computer Networks
Variations of Weighted Fair Queueing
Intro to Deterministic Analysis
Fair Queueing.
Advance Computer Networking
EE384x: Packet Switch Architectures
Computer Science Division
Advance Computer Networking
COMP/ELEC 429 Introduction to Computer Networks
Congestion Control Reasons:
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
Fair Queueing.
کنترل جریان امیدرضا معروضی.
Presentation transcript:

CS244 Packet Scheduling (Generalized Processor Sharing) Some slides created by: Ion Stoica and Mohammad Alizadeh

Context Paper: 3,699 citations (Google Scholar) 2 Abhay Parekh Student of Robert Gallager at MIT Entrepreneur, adjunct prof at Berkeley Robert “Bob” Gallager Professor Emeritus, MIT Weighted Fair Queueing (WFQ) paper: “Analysis and simulation of a fair queueing algorithm” Demers, Keshav, Shenker (SIGCOMM ’89; 3,717 citations) WFQ and PGPS are essentially same ideas, developed independently.

Problem: How to share a link? What is the “right” rate allocation? A B C 1Mb/s 10Mb/s 5Mb/s 0.5Mb/s 0.5Mb/s, 0.5Mb/s (fair?) 3

Problem: How to share a link? What is the “right” rate allocation? A B C 1Mb/s 10Mb/s 5Mb/s 0.67Mb/s 0.33Mb/s 0.5Mb/s, 0.5Mb/s (fair?) 0.67Mb/s, 0.33Mb/s 4

Problem: How to share a link? What is the “right” rate allocation? A B C 1Mb/s 10Mb/s 5Mb/s 0.1Mb/s 0.9Mb/s Bulk file transfer Voice call Tough to answer in general (depends on traffic needs, payment, policy…) 5

Rate Demanded/Allocated Flows sorted by demand Max-Min Fairness A common way to allocate flows 2 22 Total = 6 Total = Allocate in order of increasing demand 2.No flow gets more than demand 3.The excess, if any, is equally shared f = 4 : min(8, 4) = 4 min(10, 4) = 4 min(2, 4) = 2 6

What is the GPS paper about? A scheduling algorithm for (weighted) max-min fairness –Decides which flow’s packet to send next Link 1, ingressLink 1, egress Link 2, ingressLink 2, egress Link 3, ingressLink 3, egress Scheduler flow 1 flow 2 flow n Classifier 7

Properties of GPS Work conserving –Link is busy if there are packets to send Max-min fair allocation of bandwidth for best effort service Provides isolation –Traffic hogs cannot overrun others –[Why is this surprising?] End-to-end delay bounds for guaranteed service 8

What you said "This paper almost feels like it was the result of network designers feeling like they had to have bounds on runtime because they are valued in theory and in other fields, but provides no context as to why these bounds are actually important.” “Why this paper rather than the WFQ paper by Demers, Shenker, Keshav?” 9

Why is this an important paper? Jang et al. “Silo: Predictable Message Completion Time in the Cloud” (accepted to SIGCOMM 2015) “…We identify three key requirements for such predictability: guaranteed network bandwidth, guaranteed per-packet delay and guaranteed burst allowance… Silo leverages the fact that guaranteed bandwidth and delay are tightly coupled: controlling tenant bandwidth yields deterministic bounds on network queuing delay. Silo builds upon network calculus… using a novel packet pacing mechanism to ensure the requirements are met.” Thousands of citations; several best paper awards; on nearly every “must-read networking papers” list… why? 10

Outline for Rest of Today GPS (for fluid flows) Packet-by-packet GPS (PGPS) Implementing PGPS Rate and delay guarantees with GPS 11

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. Flow 1 Flow N Classification Bit-by-bit round robin Question: What is a “flow”? Question: How can we give weights? 12

Bit-by-Bit Weighted Fair Queueing Flows can be allocated different rates by servicing a different number of bits for each flow during each round. Generalized Processor Sharing (GPS): “infinitesimal amount of flow” instead of “bits” 1 w 1 = 0.1 w 3 = 0.3 R1R1 C w 4 = 0.3 w 2 = 0.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,… 13

GPS Formal Definition N flows with weights w 1, …, w N, link rate = r Flow i is continually backlogged S j (t 1,t 2 ): amount of service received by session j between times t 1 and t 2 Then, for all j: Basically, a rate guarantee 14

GPS Example flows link Red flow backlogged between time 0 and 10 Other flows continuously backlogged 15

Outline GPS (for fluid flows) Packet-by-packet GPS (PGPS) Implementing PGPS Rate and delay guarantees with GPS 16

Packet vs. Fluid System GPS is not implementable [why?] –Fluid system: multiple queues can be serviced simultaneously In real packet-based systems –One queue is served at any given time –Packet transmission cannot be preempted Goal: A packet scheme close to fluid system –Bound performance w.r.t fluid GPS 17

First Cut: Simple Round Robin Serve a packet from non-empty queues in turn –Let’s assume all flows have equal weight [Is this fair?] Variable packet length  can get more service by sending bigger packets [How might one mitigate this?] Unfair instantaneous service rate (esp. with variable weights) – E.g. 500 flows: 250 with weight 1, 250 with weight 10 – Each round takes 2,750 packet times – What if a packet arrives right after its “turn”? 18

PGPS or Weighted Fair Queuing (WFQ) Deals better with variable size packets and weights Key Idea: 1.Determine the finish time of packets in GPS, assuming no more arrivals 2.Serve packets in order of finish times Question: Why not some other metric (largest finishing time, earliest starting time)? Theorem: 19

Intuition for PGPS result Finishing order of packets currently in GPS system is independent of future arrivals [why?] A packet is delayed more by PGPS only if when it arrives, a later packet in the GPS order is already being transmitted There can be at most one such packet 20

Outline GPS (for fluid flows) Packet-by-packet GPS (PGPS) Implementing PGPS Rate and delay guarantees with GPS 21

Virtual Time Implementation Assign a “virtual finish time” to each packet upon arrival  serve packets in order of virtual times Key observation: Virtual finish time can be calculated at packet arrival. Real finish time cannot. Question: Why use virtual time? 22

Virtual Time in GPS Virtual time (V GPS ): service that backlogged flow with weight=1 would receive in GPS Backlogged flow i receives service at rate: link rate = r B(t) = set of backlogged flows Packet of length L takes L/w i virtual time to serve Question: How much virtual time does it take to serve a packet of length L of flow i? 23

Virtual Time in GPS /2 1/8 2*r r 24

Virtual Start and Finish Times Virtual times when the packets start S i k and finish F i k in fluid system 25

Putting it together: PGPS (WFQ) Implementation For kth packet of flow i arriving at time a: S i k (virtual start time) F i k (virtual finish time) (Flow i backlogged) k ……k-1 (Flow i empty) k 26

Summary of PGPS (WFQ) Pros –Excellent approximation of GPS –Preserves good properties of GPS: isolation, rate and delay guarantees [Why?] –Gives users incentive to use intelligent flow control [Why?] Cons –Needs per-flow queues (potentially millions) –Requires sorting packets by virtual finish time –Virtual time hard to implement exactly 27

Outline GPS (for fluid flows) Packet-by-packet GPS (PGPS) Implementing PGPS Rate and delay guarantees with GPS 28

GPS Rate Guarantee flows Link rate = r Red flow ends 29

How do we turn rate guarantees into delay guarantees? 30

time Cumulative bytes A(t) D(t) R Deterministic model of a router queue 31 Q(t) FIFO delay, d(t) R A(t)D(t) Model of router queue Q(t) Properties of A(t), D(t): 1. A(t), D(t) are non-decreasing 2. A(t) >= D(t)

Flow 1 Flow N Classification WFQ Scheduler A 1 (t) A N (t) R(f 1 ), D 1 (t) R(f N ), D N (t) time Cumulative bytes A 1 (t) D 1 (t) R(f1)R(f1) Key idea: Constrain arrival process A(t) 32

Leaky bucket“(  )” regulator 33 Tokens at rate,  Token bucket size,  Packet buffer Packets One byte per token # of bytes in any period of length t is bounded by:

(  ) Constrained Arrivals and Minimum Service Rate 34 time Cumulative bytes A 1 (t) D 1 (t) R(f1)R(f1)   d max B max Theorem: If flows are leaky-bucket constrained, and routers use WFQ, then end-to-end delay guarantees are possible.

Question How do you get delay bounds for multi-hop networks? Subject of “A generalized processor sharing … : The multiple node case” [Parekh, Gallagher, 1994] “Output burstiness” characterization of GPS key: 35

Is this practical? 36

What you said "I had one main question when I read the paper; do people actually use leaky bucket in practice? …it seems like it would require a lot of dynamic coordination between the senders in the multiple flow case to achieve reasonable link utilization.” 37

Is this practical? Difficult to make work; requires a lot of coordination How do networks get reasonable delay today? 38 Google B4 SDN WAN uses global rate limiting from end- hosts! See: - B4 (SIGCOMM 2013) - BwEnforcer (SIGCOMM 2015) * Figure from B4 [SIGCOMM 2013]

39

Question Are delay guarantees possible even when R(f i ) < ρ i for some 1 ≤ i ≤ N? Yes! As long as: (r is link speed) Thoerem: Worst case is when all flows are “greedy” at time  Cumulative bytes time A i (t) 

Question What kind of fairness does TCP provide? Statistical, over a large number of round-trip times 41

Rate Allocation vs Delay A B C 1Mb/s 0.1Mb/s Mon Tue Wed Thu Fri Sat Sun Mon 1Mb/s 1/7 Mb/s Voice call Time-scale of guarantee critical for delay guarantees 42