1 CS 194: Distributed Systems Resource Allocation Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.

Slides:



Advertisements
Similar presentations
Quality of Service CS 457 Presentation Xue Gu Nov 15, 2001.
Advertisements

Spring 2003CS 4611 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services.
Spring 2000CS 4611 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services.
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 – QoS.
TAs: Junda Liu, DK Moon, David Zats
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 20 – March 25, 2010.
CS 268: Lecture 8 Router Support for Congestion Control Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
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.
CPSC Topics in Multimedia Networking A Mechanism for Equitable Bandwidth Allocation under QoS and Budget Constraints D. Sivakumar IBM Almaden Research.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6600: Internet Protocols Informal Quiz #11 Shivkumar Kalyanaraman: GOOGLE: “Shiv RPI”
Differentiated Services. Service Differentiation in the Internet Different applications have varying bandwidth, delay, and reliability requirements How.
15-441: Computer Networking Lecture 18: QoS Thanks to David Anderson and Srini Seshan.
CS 268: Lecture 15/16 (Packet Scheduling) Ion Stoica April 8/10, 2002.
Integrated Services and Differentiated Services. Limitations of IP Architecture in Supporting Resource Management IP provides only best effort service.
ACN: IntServ and DiffServ1 Integrated Service (IntServ) versus Differentiated Service (Diffserv) Information taken from Kurose and Ross textbook “ Computer.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
CS Summer 2003 Lecture 8. CS Summer 2003 Populating LFIB with LDP Assigned/Learned Labels Changes in the LFIB may be triggered routing or.
CS 268: Differentiated Services Ion Stoica February 25, 2003.
CSE 401N Multimedia Networking-2 Lecture-19. Improving QOS in IP Networks Thus far: “making the best of best effort” Future: next generation Internet.
1 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services.
15-744: Computer Networking
1 CS 268: Lecture 13 QoS: DiffServ and IntServ Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences University.
School of Information Technologies IP Quality of Service NETS3303/3603 Weeks
Internet QoS Syed Faisal Hasan, PhD (Research Scholar Information Trust Institute) Visiting Lecturer ECE CS/ECE 438: Communication Networks.
CSc 461/561 CSc 461/561 Multimedia Systems Part C: 3. QoS.
CS 268: Lecture 10 (Integrated Services) Ion Stoica March 4, 2002.
CS 268: Lecture 11 (Differentiated Services) Ion Stoica March 6, 2001.
Spring 2002CS 4611 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services.
CS 268: Integrated Services Ion Stoica February 23, 2004.
24-1 Chapter 24. Congestion Control and Quality of Service part Quality of Service 23.6 Techniques to Improve QoS 23.7 Integrated Services 23.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.
Integrated Services (RFC 1633) r Architecture for providing QoS guarantees to individual application sessions r Call setup: a session requiring QoS guarantees.
1 Integrated and Differentiated Services Multimedia Systems(Module 5 Lesson 4) Summary: r Intserv Architecture RSVP signaling protocol r Diffserv Architecture.
CSE679: QoS Infrastructure to Support Multimedia Communications r Principles r Policing r Scheduling r RSVP r Integrated and Differentiated Services.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 23 - Multimedia Network Protocols (Layer 3) Klara Nahrstedt Spring 2011.
CSE QoS in IP. CSE Improving QOS in IP Networks Thus far: “making the best of best effort”
QOS مظفر بگ محمدی دانشگاه ایلام. 2 Why a New Service Model? Best effort clearly insufficient –Some applications need more assurances from the network.
CS 268: Integrated Services Lakshminarayanan Subramanian Feb 20, 2003.
CSC 336 Data Communications and Networking Lecture 8d: Congestion Control : RSVP Dr. Cheer-Sun Yang Spring 2001.
1 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services MPLS.
© Jörg Liebeherr, Quality-of-Service Architectures for the Internet Integrated Services (IntServ)
Network Support for QoS – DiffServ and IntServ Hongli Luo CEIT, IPFW.
CS640: Introduction to Computer Networks Aditya Akella Lecture 21 – QoS.
EE 122: Lecture 15 (Quality of Service) Ion Stoica October 25, 2001.
1 Multimedia Networking: Beyond Best-Effort Internet.
Ch 6. Multimedia Networking Myungchul Kim
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.
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.
Differentiated Services Two Approaches for Providing QoS on the Internet u “Freeway model” -- integrated services Internet (intserv) – Build a dedicated.
Chapter 6 outline r 6.1 Multimedia Networking Applications r 6.2 Streaming stored audio and video m RTSP r 6.3 Real-time, Interactive Multimedia: Internet.
EE 122: Integrated Services Ion Stoica November 13, 2002.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
An End-to-End Service Architecture r Provide assured service, premium service, and best effort service (RFC 2638) Assured service: provide reliable service.
Providing QoS in IP Networks
Integrated Services & RSVP Types of pplications Basic approach in IntServ Key components Service models.
Quality of Service Frameworks Hamed Khanmirza Principles of Network University of Tehran.
1 Lecture 15 Internet resource allocation and QoS Resource Reservation Protocol Integrated Services Differentiated Services.
Internet Quality of Service
Advanced Computer Networks
EE 122: Lecture 16/17 (Integrated Services)
Advanced Computer Networks
EE 122: Quality of Service and Resource Allocation
EE 122: Lecture 18 (Differentiated Services)
Computer Science Division
COMP/ELEC 429 Introduction to Computer Networks
EE 122: Differentiated Services
CIS679: Two Planes and Int-Serv Model
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
کنترل جریان امیدرضا معروضی.
Presentation transcript:

1 CS 194: Distributed Systems Resource Allocation Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA

2 Goals and Approach  Goal: achieve predicable performances  Three steps: 1)Estimate application’s resource needs (not in this lecture) 2)Admission control 3)Resource allocation

3 Type of Resources  CPU  Storage: memory, disk  Bandwidth  Devices (e.g., vide camera, speakers)  Others: -File descriptors -Locks -…

4 Allocation Models  Shared: multiple applications can share the resource -E.g., CPU, memory, bandwidth  Non-shared: only one application can use the resource at a time -E.g., devices

5 Not in this Lecture…  How application determine their resource needs  How users “pay” for resources and how they negotiate resources  Dynamic allocation, i.e., application allocates resources as it needs them

6 In this Lecture…  Focus on bandwidth allocation -CPU similar -Storage allocation usually done in fixed chunks  Assume application requests all resources at once

7 Two Models  Integrated Services -Fine grained allocation; per-flow allocation  Differentiated services -Coarse grained allocation (both in time and space)  Flow: a stream of packets between two applications or endpoints

8 Integrated Services Example Sender Receiver  Achieve per-flow bandwidth and delay guarantees -Example: guarantee 1MBps and < 100 ms delay to a flow

9 Integrated Services Example Sender Receiver  Allocate resources - perform per-flow admission control

10 Integrated Services Example Sender Receiver  Install per-flow state

11 Sender Receiver  Install per flow state Integrated Services Example

12 Integrated Services Example: Data Path Sender Receiver  Per-flow classification

13 Integrated Services Example: Data Path Sender Receiver  Per-flow buffer management

14 Integrated Services Example Sender Receiver Per-flow scheduling

15 How Things Fit Together Admission Control Data In Data Out Control Plane Data Plane Scheduler Routing Messages RSVP messages Classifier RSVP Route Lookup Forwarding Table Per Flow QoS Table

16 Service Classes  Multiple service classes  Service: contract between network and communication client -End-to-end service -Other service scopes possible  Three common services -Best-effort (“elastic” applications) -Hard real-time (“real-time” applications) -Soft real-time (“tolerant” applications)

17 Hard Real Time: Guaranteed Services  Service contract -Network to client: guarantee a deterministic upper bound on delay for each packet in a session -Client to network: the session does not send more than it specifies  Algorithm support -Admission control based on worst-case analysis -Per flow classification/scheduling at routers

18 Soft Real Time: Controlled Load Service  Service contract: -Network to client: similar performance as an unloaded best-effort network -Client to network: the session does not send more than it specifies  Algorithm Support -Admission control based on measurement of aggregates -Scheduling for aggregate possible

19 Role of RSVP in the Architecture  Signaling protocol for establishing per flow state  Carry resource requests from hosts to routers  Collect needed information from routers to hosts  At each hop -Consult admission control and policy module -Set up admission state or informs the requester of failure

20 RSVP Design Features  IP Multicast centric design (not discussed here…)  Receiver initiated reservation  Different reservation styles  Soft state inside network  Decouple routing from reservation

21 RSVP Basic Operations  Sender: sends PATH message via the data delivery path -Set up the path state each router including the address of previous hop  Receiver sends RESV message on the reverse path -Specifies the reservation style, QoS desired -Set up the reservation state at each router  Things to notice -Receiver initiated reservation -Decouple routing from reservation -Two types of state: path and reservation

22 Route Pinning  Problem: asymmetric routes -You may reserve resources on R  S3  S5  S4  S1  S, but data travels on S  S1  S2  S3  R !  Solution: use PATH to remember direct path from S to R, i.e., perform route pinning S1 S2 S3 S S R R S5 S4 PATH RESV IP routing

23 PATH and RESV messages  PATH also specifies -Source traffic characteristics Use token bucket -Reservation style – specify whether a RESV message will be forwarded to this server  RESV specifies -Queueing delay and bandwidth requirements -Source traffic characteristics (from PATH) -Filter specification, i.e., what senders can use reservation -Based on these routers perform reservation

24 Token Bucket and Arrival Curve  Parameters -r – average rate, i.e., rate at which tokens fill the bucket -b – bucket depth -R – maximum link capacity or peak rate (optional parameter)  A bit is transmitted only when there is an available token  Arrival curve – maximum number of bits transmitted within an interval of time of size t r bps b bits <= R bps regulator time bits b*R/(R-r) slope R slope r Arrival curve

25 How Is the Token Bucket Used?  Can be enforced by -End-hosts (e.g., cable modems) -Routers (e.g., ingress routers in a Diffserv domain)  Can be used to characterize the traffic sent by an end-host

26 Traffic Enforcement: Example  r = 100 Kbps; b = 3 Kb; R = 500 Kbps 3Kb T = 0 : 1Kb packet arrives (a) 2.2Kb T = 2ms : packet transmitted b = 3Kb – 1Kb + 2ms*100Kbps = 2.2Kb (b) 2.4Kb T = 4ms : 3Kb packet arrives (c) 3Kb T = 10ms : packet needs to wait until enough tokens are in the bucket! (d) 0.6Kb T = 16ms : packet transmitted (e)

27 Source Traffic Characterization  Arrival curve – maximum amount of bits transmitted during an interval of time Δt  Use token bucket to bound the arrival curve ΔtΔt bits Arrival curve time bps

28 Source Traffic Characterization: Example  Arrival curve – maximum amount of bits transmitted during an interval of time Δt  Use token bucket to bound the arrival curve bits Arrival curve time bps (R=2,b=1,r=1) ΔtΔt

29 QoS Guarantees: Per-hop Reservation  End-host: specify -The arrival rate characterized by token-bucket with parameters (b,r,R) -The maximum maximum admissible delay D  Router: allocate bandwidth r a and buffer space B a such that -No packet is dropped -No packet experiences a delay larger than D bits b*R/(R-r) slope r Arrival curve D BaBa slope r a

30 End-to-End Reservation  When R gets PATH message it knows -Traffic characteristics (tspec): (r,b,R) -Number of hops  R sends back this information + worst-case delay in RESV  Each router along path provide a per-hop delay guarantee and forward RESV with updated info -In simplest case routers split the delay S1 S2 S3 S S R R (b,r,R) (b,r,R,3) num hops (b,r,R,2,D- d 1 ) (b,r,R,1,D- d 1 - d 2 ) (b,r,R,0,0) (b,r,R,3,D) worst-case delay PATH RESV

31

32 Differentiated Services (Diffserv)  Build around the concept of domain  Domain – a contiguous region of network under the same administrative ownership  Differentiate between edge and core routers  Edge routers -Perform per aggregate shaping or policing -Mark packets with a small number of bits; each bit encoding represents a class (subclass)  Core routers -Process packets based on packet marking  Far more scalable than Intserv, but provides weaker services

33 Diffserv Architecture  Ingress routers -Police/shape traffic -Set Differentiated Service Code Point (DSCP) in Diffserv (DS) field  Core routers -Implement Per Hop Behavior (PHB) for each DSCP -Process packets based on DSCP Ingress Egress Ingress Egress DS-1 DS-2 Edge router Core router

34 Differentiated Services  Two types of service -Assured service -Premium service  Plus, best-effort service

35 Assured Service [Clark & Wroclawski ‘97]  Defined in terms of user profile, how much assured traffic is a user allowed to inject into the network  Network: provides a lower loss rate than best-effort -In case of congestion best-effort packets are dropped first  User: sends no more assured traffic than its profile -If it sends more, the excess traffic is converted to best- effort

36 Assured Service  Large spatial granularity service  Theoretically, user profile is defined irrespective of destination -All other services we learnt are end-to-end, i.e., we know destination(s) apriori  This makes service very useful, but hard to provision (why ?) Ingress Traffic profile

37 Premium Service [Jacobson ’97]  Provides the abstraction of a virtual pipe between an ingress and an egress router  Network: guarantees that premium packets are not dropped and they experience low delay  User: does not send more than the size of the pipe -If it sends more, excess traffic is delayed, and dropped when buffer overflows

38 Edge Router Classifier Traffic conditioner Scheduler Class 1 Class 2 Best-effort Marked traffic Ingress Per aggregate Classification (e.g., user) Data traffic

39 Assumptions  Assume two bits -P-bit denotes premium traffic -A-bit denotes assured traffic  Traffic conditioner (TC) implement -Metering -Marking -Shaping

40 Control Path  Each domain is assigned a Bandwidth Broker (BB) -Usually, used to perform ingress-egress bandwidth allocation  BB is responsible to perform admission control in the entire domain  BB not easy to implement -Require complete knowledge about domain -Single point of failure, may be performance bottleneck -Designing BB still a research problem

41 Example  Achieve end-to-end bandwidth guarantee BB sender receiver 8 profile 6 4

42 Comparison to Best-Effort and Intserv DiffservIntserv ServicePer aggregate isolation Per aggregate guarantee Per flow isolation Per flow guarantee Service scope DomainEnd-to-end ComplexityLong term setupPer flow steup ScalabilityScalable (edge routers maintains per aggregate state; core routers per class state) Not scalable (each router maintains per flow state)

43 Weighted Fair Queueing (WFQ)  The scheduler of choice to implement bandwidth and CPU sharing  Implements max-min fairness: each flow receives min ( r i, f ), where -r i – flow arrival rate -f – link fair rate (see next slide)  Weighted Fair Queueing (WFQ) – associate a weight with each flow

44 Fair Rate Computation: Example 1  If link congested, compute f such that f = 4 : min(8, 4) = 4 min(6, 4) = 4 min(2, 4) = 2 10

45 Fair Rate Computation: Example 2  Associate a weight w i with each flow i  If link congested, compute f such that f = 2 : min(8, 2*3) = 6 min(6, 2*1) = 2 min(2, 2*1) = 2 10 ( w 1 = 3) ( w 2 = 1) ( w 3 = 1) If Σ k w k = w i Flow i is guaranteed to be allocated a rate >= wi *C/( Σ k w k )

46 Fluid Flow System  Flows can be served one bit at a time  WFQ can be implemented using bit-by-bit weighted round robin -During each round from each flow that has data to send, send a number of bits equal to the flow’s weight

47 Fluid Flow System: Example Flow 2 (arrival traffic) Flow 1 (arrival traffic) time Packet Size (bits) Packet inter-arrival time (ms) Rate (C) (Kbps) Flow Flow Kbps Flow 1 ( w 1 = 1) Flow 2 ( w 2 = 1) Service in fluid flow system time (ms) Area (C x transmission_time) = packet size C transmission time

48 Fluid Flow System: Example  Red flow has sends packets between time 0 and 10 -Backlogged flow  flow’s queue not empty  Other flows send packets continuously  All packets have the same size flows link weights

49 Implementation In Packet System  Packet (Real) system: packet transmission cannot be preempted.  Solution: serve packets in the order in which they would have finished being transmitted in the fluid flow system

50 Packet System: Example Packet system time Service in fluid flow system time (ms)  Select the first packet that finishes in the fluid flow system

51 Packet System: Example  Select the first packet that finishes in the fluid flow system Service in fluid flow system Packet system

52 Implementation Challenge  Need to compute the finish time of a packet in the fluid flow system…  … but the finish time may change as new packets arrive!  Need to update the finish times of all packets that are in service in the fluid flow system when a new packet arrives -But this is very expensive; a high speed router may need to handle hundred of thousands of flows!

53 Example  Four flows, each with weight 1 Flow 1 time ε Flow 2 Flow 3 Flow Finish times computed at time 0 time Finish times re-computed at time ε 01234

54 Solution: Virtual Time  Key Observation: while the finish times of packets may change when a new packet arrives, the order in which packets finish doesn’t! -Only the order is important for scheduling  Solution: instead of the packet finish time maintain the number of rounds needed to send the remaining bits of the packet (virtual finishing time) -Virtual finishing time doesn’t change when the packet arrives  System virtual time – index of the round in the bit-by-bit round robin scheme

55 System Virtual Time: V(t)  Measure service, instead of time  V(t) slope – normalized rate at which every backlogged flow receives service in the fluid flow system -C – link capacity -N(t) – total weight of backlogged flows in fluid flow system at time t time V(t)

56 System Virtual Time (V(t)): Example 1  V(t) increases inversely proportionally to the sum of the weights of the backlogged flows Flow 2 (w2 = 1) Flow 1 (w1 = 1) time C C/2V(t)

57 System Virtual Time: Example w1 = 4 w2 = 1 w3 = 1 w4 = 1 w5 = 1 C/4 C/8 C/4 V(t)

58 Fair Queueing Implementation  Define - - virtual finishing time of packet k of flow i - - arrival time of packet k of flow i - - length of packet k of flow i -w i – weight of flow i  The finishing time of packet k+1 of flow i is / w i

59 Properties of WFQ  Guarantee that any packet is transmitted within packet_lengt/link_capacity of its transmission time in the fluid flow system -Can be used to provide guaranteed services  Achieve max-min fair allocation -Can be used to protect well-behaved flows against malicious flows

60 Hierarchical Link Sharing  Resource contention/sharing at different levels  Resource management policies should be set at different levels, by different entities -Resource owner -Service providers -Organizations -Applications Link Provider 1 seminar video Math Stanford.Berkeley Provider 2 WEB 155 Mbps 50 Mbps 10 Mbps 20 Mbps 100 Mbps 55 Mbps Campus seminar audio EECS

61 Packet Approximation of H-WFQ  Idea 1 -Select packet finishing first in H- WFQ assuming there are no future arrivals -Problem: Finish order in system dependent on future arrivals Virtual time implementation won’t work  Idea 2 -Use a hierarchy of WFQ to approximate H-WFQ WFQ 10 Packetized H-WFQ Fluid Flow H-WFQ WFQ 10