170 likes | 292 Vues
This overview explores Quality of Service (QoS) as it pertains to multimedia applications and network performance. It delves into key concepts such as the Leaky Bucket and Token Bucket algorithms for traffic shaping. The Leaky Bucket ensures smooth output by controlling burst data flows, while the Token Bucket allows for burstiness up to a set limit. Examples illustrate how these algorithms manage network traffic under various conditions, ensuring data flows at optimal rates while maintaining quality standards essential for real-time applications.
E N D
Communication Networks Recitation 10 QoS Comnet 2006
QoS network provides application with level of performance needed for application to function. Quality of Service: What is it? Multimedia applications: network audio and video Comnet 2006
Traffic Shaping The Leaky Bucket Algorithm (a) A leaky bucket with water. (b) a leaky bucket with packets. Comnet 2006
Leaky Bucket example • A source generates data in terms of bursts: 3 MB bursts lasting 2 msec once every 100 msec. • The network offers a bandwidth of 60 MB/sec. • The leaky bucket has a capacity of 4 MB. How does the output look like? • Input:0-2 msec: 1500 MB/sec; 100-102 msec: 1500 MB/sec; 200-202 msec: 1500 MB/sec; … • Output: 0-50 msec: 60 MB/sec; 100-150 msec: 60 MB/sec; …. Comnet 2006
Leaky Bucket CNTD. • What should be the capacity of the leaky bucket to avoid loss? • During the burst, data inflow is at the rate of 1.5 MB/msec and the outflow is at the rate of 0.06 MB/msec. • So accumulation is at the rate of 1.44 MB/msec. So at the end of 2 msec, there will be an accumulation of 2.88 MB. This is the minimum leaky bucket capacity to avoid buffer overflow and hence data loss. Comnet 2006
The Token Bucket Algorithm 5-34 (a) Before. (b) After. Token bucket allows some burstiness (up to the number of token the bucket can hold) Comnet 2006
Token Bucket – simple example • 2 tokens of size 100 bytes added each second to the token bucket of capacity 500 bytes • Avg. rate = 200 bytes/sec, burst size = 500 bytes • Packets bigger than 500 bytes will never be sent • Peak rate is unbounded – i.e., 500 bytes of burst can be transmitted arbitrarily fast Comnet 2006
Token Bucket example • Bucket capacity: 1 MB • Token arrival rate: 2 MB/sec • Network capacity: 10 MB/sec • Application produces 0.5 MB burst every 250 msec For 3 seconds • The bucket is full of tokens Comnet 2006
Token Bucket example CNTD. • Initially, output can be at the rate of 10 MB/s. But how long can the bucket sustain this? • First, 1MB can be sent • From then on, for X seconds, the token input rate is 2MB/s, the traffic rate is 10MB/s • 1 + 2X = 10X 8X = 1 X = 1/8 sec =125 ms • The bucket can transmit 1.25 MB in this time > 0.5MB the application produces • Output: 0-50 ms: 10 MB/s 50-250 ms: None Comnet 2006
Token Bucket example CNTD. • At the end of this period, the amount of tokens in the bucket is: • 1MB+250ms*2MB/s-0.5MB=1MB • So the bucket is full again! • Repeat for 3 seconds Comnet 2006
Minimum Bucket size and Token Rate • Discarding Bucket (Policing) • Bucket Size ≥ 0.5MB • Token Rate ≥ 0.5MB/250ms = 2MB/s • Queueing Bucket (Shaping) • How will the traffic look with Bucket Size = 200K? • 0.2+2X=10X X=0.2/8=0.025s=25ms • 0-25ms : 10 MB/s = 0.25MB. 0.25MB left • 0.25MB/(2MB/s) = 125ms • 25-150ms: 2MB/s • 150-250ms: None • Tokens after: 100ms*2MB/s=0.2MB Comnet 2006
(σ,ρ) Model • Over an interval of length t the number of packets/bits that are admitted is less than or equal to (σ+ρt). • Composing flows (σ1,ρ1) & (σ2,ρ2) • Resulting flow (σ1+ σ2,ρ1+ρ2) • What does a router need to support streams: (σ1,ρ1) … (σk,ρk) • Buffer size B > Σσi • Rate R > Σ ρi • Admission Control (at the router) • Can support (σk,ρk) if • Enough buffers and bandwidth • R > Σ ρi and B > Σ σi Comnet 2006
(σ,ρ) Model example • The line from the previous question has router with 4MB of buffers. How many flows of the above kind can it accept? • σ = 0.5MB, ρ = 0.5MB/250ms = 2MB/s • For n flows, we require 0.5n MB buffers, 2n MB/s rate n = 5. • Each line will be served with a 0.5MB:2MB/s token bucket Comnet 2006
IntServ (RFC1633) Comnet 2006
DiffServ (RFC2474/2475) Comnet 2006
Assured Forwarding PHB • AF defines 4 classes • Strong assurance for traffic within profile & allow source to exceed profile • Admission based on expected capacity usage profiles • Within each class, there are three drop priorities • User and network agree to some traffic profile • Edges mark packets up to allowed rate as “in-profile” or high priority • Other packets are marked with one of 2 lower “out-of-profile” priorities • A congested router drops lower priority packets first • Implemented using clever queue management (RED with In/Out bit) Comnet 2006
Expedited Forwarding PHB • User sends within profile & network commits to delivery with requested profile • Strong guarantee • Admitted based on peak rate • Rate limiting of EF packets at edges only, using token bucket to shape transmission • Simple forwarding: classify packet in one of two queues, use priority • EF packets are forwarded with minimal delay and loss (up to the capacity of the router) Comnet 2006