CS352 - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

CS352

Description:

To reduce the rate to 2 MBps, we can use a leaky bucket. A leaky bucket is described by a constant output rate and a buffer capacity C. ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 15
Provided by: robert534
Category:
Tags: cs352 | leaky

less

Transcript and Presenter's Notes

Title: CS352


1
CS352
  • Leaky Bucket / Token Bucket
  • Examples

2
Leaky Bucket
  • Suppose that data arrives at 25 MBps in 40 msec
    bursts every second. To reduce the rate to 2
    MBps, we can use a leaky bucket. A leaky bucket
    is described by a constant output rate and a
    buffer capacity C. How big must C be to avoid
    that data is lost? How long does it take to
    transmit all the data in each burst?

3
Leaky Bucket
  • The rate is 25 MBps (million BYTES / sec)
  • Duration is 40 msec

4
Leaky Bucket
  • The rate is 25 MBps (million BYTES / sec)
  • Duration is 40 msec

5
Leaky Bucket
  • If buffer capacity is C, how big must C be?

6
Leaky Bucket
  • If buffer capacity is C, how big must C be?
  • C 1 MByte

7
Leaky Bucket
  • If the output rate is 2MBps, how long does it
    take to transmit all the data?
  • If we have 1 Mbyte to send at a rate of 2MBps,
    then it will take ½ second or 500 millisecs

8
Token Bucket
  • Assume instead that we use a token bucket with a
    capacity of 500 KB for the scenario in the
    problem above. Tokens arrive at a rate of 2 MBps.
    Assuming that the token bucket is full when the
    data burst arrives, how long does it take to
    transmit the entire burst?

9
Token Bucket
  • Definitions
  • S burst length in sec
  • C token bucket capacity
  • ? token arrival rate (bytes/sec)
  • M maximum output rate (bytes/sec)
  • Then
  • C ?S MS

10
Token Bucket
  • C ?S MS, or
  • S C / (M - ?)

11
Token Bucket
  • Our question How long does it take to transmit
    the entire burst?
  • C 500KB 0.5MB
  • M 25 MB/sec
  • ? 2 MB/sec
  • S C / (M - ?)
  • 0.5 / (25 2)
  • 0.022 secs 22 msecs

12
Token Bucket
  • The maximum burst rate can be sustained for 22
    msecs,
  • 25 MB/sec 0.022 secs 0.55 MB
  • 1 MB 0.55 MB 0.45 MB
  • Then,
  • 0.45 MB 1 sec/2MB 0.225 secs
  • So, 225 22 247 msecs

13
Token Bucket
  • Now suppose the token bucket capacity is reduced
    to 250 KB.
  • C 250KB 0.25MB
  • M 25 MB/sec
  • ? 2 MB/sec
  • S C / (M - ?)
  • 0.25 / (25 2)
  • 0.011 secs 11 msecs

14
Token Bucket
  • The maximum burst rate can be sustained for 11
    msecs,
  • 25 MB/sec 0.011 secs 0.275 MB
  • 1 MB 0.275 MB 0.725 MB
  • Then,
  • 0.725 MB 1 sec/2MB 0.362 secs
  • So, 362 11 373 msecs
Write a Comment
User Comments (0)
About PowerShow.com