Token Bucket.

Slides:



Advertisements
Similar presentations
CprE 458/558: Real-Time Systems
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.
TELE202 Lecture 8 Congestion control 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »X.25 »Source: chapter 10 ¥This Lecture »Congestion control »Source:
Review: Routing algorithms Distance Vector algorithm. –What information is maintained in each router? –How to distribute the global network information?
Traffic Shaping Why traffic shaping? Isochronous shaping
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 16 – Multimedia Transport Subsystem (Part 3) Klara Nahrstedt Spring 2009.
Resource Allocation: Deterministic Analysis. Traffic Model Stochastic Different sample paths with different properties Expected case analysis Deterministic.
© 2006 Cisco Systems, Inc. All rights reserved. Module 4: Implement the DiffServ QoS Model Lesson 4.7: Introducing Traffic Policing and Shaping.
1.  Congestion Control Congestion Control  Factors that Cause Congestion Factors that Cause Congestion  Congestion Control vs Flow Control Congestion.
Token Bucket. © Jörg Liebeherr, 2013 Tokens are added at rate r up to a maximum size of TB max.
Engineering Internet QoS
Abhay.K.Parekh and Robert G.Gallager Laboratory for Information and Decision Systems Massachusetts Institute of Technology IEEE INFOCOM 1992.
Cloud Control with Distributed Rate Limiting Raghaven et all Presented by: Brian Card CS Fall Kinicki 1.
Courtesy: Nick McKeown, Stanford 1 Intro to Quality of Service Tahir Azim.
EECB 473 Data Network Architecture and Electronics Lecture 3 Packet Processing Functions.
Recent Progress on a Statistical Network Calculus Jorg Liebeherr Department of Computer Science University of Virginia.
Differentiated Services. Service Differentiation in the Internet Different applications have varying bandwidth, delay, and reliability requirements How.
CS 268: Lecture 15/16 (Packet Scheduling) Ion Stoica April 8/10, 2002.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
CS144, Stanford University Error in Q3-7. CS144, Stanford University Using longest prefix matching, the IP address will match which entry? a /8.
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.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 23 Congestion Control and Quality of Service.
Quality of Service (QoS)
CS640: Introduction to Computer Networks Aditya Akella Lecture 20 - Queuing and Basics of QoS.
Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose.
Providing Delay Guarantees in Bluetooth Rachid Ait Yaiz and Geert Heijenk International Conference on Distributed Computing Systems Workshops (ICDCSW’03)
Univ. of TehranAdv. topics in Computer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
1 Why traffic shaping? yIn packet networks that implement resource sharing xadmission control and scheduling alone are insufficient users may attempt to.
Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-IP 7.4 protocols for real-time conversational.
© Jörg Liebeherr, Quality-of-Service Architectures for the Internet.
1 Multimedia Networking: Beyond Best-Effort Internet.
Random Early Detection (RED) Router notifies source before congestion happens - just drop the packet (TCP will timeout and adjust its window) - could make.
1 On Maximum Rate Control of Weighted Fair Scheduling Jeng Farn Lee.
An End-to-End Service Architecture r Provide assured service, premium service, and best effort service (RFC 2638) Assured service: provide reliable service.
Spring Computer Networks1 Congestion Control Sections 6.1 – 6.4 Outline Preliminaries Queuing Discipline Reacting to Congestion Avoiding Congestion.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 16 – Multimedia Transport (Part 2) Klara Nahrstedt Spring 2011.
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.
1 Lecture 15 Internet resource allocation and QoS Resource Reservation Protocol Integrated Services Differentiated Services.
A Low Interference Channel Assignment Algorithm for Wireless Mesh Networks Can Que 1,2, Xinming Zhang 1, and Shifang Dai 1 1.Department of Computer Science.
Tel Hai Academic College Department of Computer Science Prof. Reuven Aviv Markov Models for data flow In Computer Networks Resource: Fayez Gebali, Analysis.
04/02/08 1 Packet Scheduling IT610 Prof. A. Sahoo KReSIT.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 4: Implement the DiffServ QoS Model.
Data Link Layer Lower Layers Local Area Network Standards
Advanced Computer Networks
QoS & Queuing Theory CS352.
Topics discussed in this section:
Intro to Deterministic Analysis
Intro to Deterministic Analysis
Net 221D : Computer Networks Fundamentals
CONGESTION CONTROL.
Bufferless multiplexer
Delays in Packet Networks
Scheduling in Packet Networks
Intro to Deterministic Analysis
Computer Science Division
Figure Areas in an autonomous system
Packet Scheduling in Linux
ECE 1545 Service Curve Earliest Deadline Due (SCED) or How to construct a scheduler from a service curve.
Network Support for Quality of Service (QoS)
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
Introduction to Traffic Shaping
Error Checking continued
کنترل جریان امیدرضا معروضی.
Presentation transcript:

Token Bucket

Traffic regulator Receiver Sender Traffic regulator Goal: Traffic entering the network should comply to a given envelope

Traffic regulators Traffic exceeding the envelope is non-compliant. What do to with non-compliant traffic ? Buffer  Traffic shaping Drop  Traffic policing Allow, but assign low priority  Traffic marking We focus on Traffic shapers © Jörg Liebeherr, 2006 ECE 1545

Traffic shapers Envelope Traffic shaper enforces that the departures D comply to a traffic envelope E Non-compliant traffic is stored in a FIFO buffer Buffered traffic is released as soon as allowed  This type of shaper is called “Greedy Shaper” Envelope

Token Bucket Token Bucket is a traffic regulation mechanism to enforce that departures comply to the envelope Traffic Time interval b Slope r

Token Bucket Tokens are added at rate r up to a maximum size of TBmax

Token Bucket Assume: Packet can depart if enough tokens are available. Tokens are removed tokens when packet departs (Here: 10 tokens are needed)

Token Bucket Assume: Packet removes 10 tokens from buffer (Number of tokens is associated with packet size)

Token Bucket Packet must wait until enough tokens are available

Token Bucket (fluid flow version) For an analysis we work with a fluid flow version of the token bucket (Traffic can depart in arbitrary small chunks)

TBmax = b = 2 r = 1

TBmax = b = 2 r = 1 A+TB-B

Implementation

Implementation in Lab 2 (a+b) TokenBucket

Token Bucket in Lab 2 (a+b) TokenBucketReceiver (BR) TokenBucketSender (BS) if (buffer_is_empty && not(sendingInProgress) && enough_tokens_available) consume tokens; send packet; else add packet to buffer; If (buffer_is_not_empty) if (enough_tokens) consume tokens; sendingInProgress = true; remove packet from buffer; send packet; sendingInProgress = false; else get expected time when there will be enough tokens; sleep for this time; wait for packet to arrive to buffer;

Alternative implementation for Token Bucket? Idea: instead of counting tokens (and compute timestamps from tokens), work directly with timestamps VC : release time of packet (init: VC = 0) l : packet size now : current time TDTp : Target departure time of packet p b TokenBucketSender (BS) TokenBucketReceiver (BR) If (buffer_is_not_empty) if (TDThead_of_buffer ≤ now) sendingInProgress = true; remove packet from buffer; send packet; sendingInProgress = false; else sleep for now - TDThead_of_buffer ; wait for packet to arrive to buffer; VC = max {VC, now} + l/r; if ( buffer_is_empty && not(sendingInProgress) && VC - b/r ≤ now ) send packet; else Set TDTp = VC - b/r; add packet to buffer;

Peak Rate Constrained Token Bucket Adds a constraint on the maximum (“peak”) rate of traffic: Is implemented with 2 token buckets in series. Traffic Slope r b Slope P Time interval