Question

I'm trying to review for my final and I'm going over example problems given to me by my professor. Can anyone explain to me the concept of how leaky bucket works. Also Here's a review problem my professor gave to me about leaky buckets.

A leaky bucket is at the host network interface. The data rate in the network is 2 Mbyte/s and the data rate from the application to the bucket is 2m5 Mbyte/s

A.) Suppose the host has 250 Mbytes to send onto the network and it sends the data in one burst. What should the minimum capacity of the bucket (in byte) in order that no data is lost?

B.) Suppose the capacity of the bucket is 100M bytes. What is the longest burst time from the host in order that no data is lost?

Was it helpful?

Solution

Leaky bucket symbolizes a bucket with a small hole allowing water (data) to come out at the bottom. Since the top of the bucket has a greater aperture than the bottom, you can put water in it faster that it goes out (so the bucket fills up).

Basically, it represents a buffer on a network between 2 links with different rates.

Problem A

We can compute that sending the data will take 250Mbyte / (2,5Mbyte / s) = 100 s.

During that 100 s, the bucket will have retransmitted (leaked) 100s * 2Mbyte/s = 200Mbytes

So the bucket will need a minimum capacity of 250MB - 200MB = 50MB in order not to lose any data

Problem B

Since the difference between the 2 data rates is 2.5MB/s - 2.0MB/s = 0.5MB/s, it means the bucked fills up by 0.5MB/s (when both links transmit at full capacity).

You can then calculate that the 100MB capacity will be filled after a burst of 100MB / 0.5MB/s = 200s = 3m 20s

OTHER TIPS

Interesting problem - here's my attempt at solving A (no gurantees it's right though!)

So rate in = 2.5, rate out = 2.0, where the rate is in Mbyte/s.

So in 1 second, the bucket will contain 2.5 - 2.0 = 0.5 Mbyte.

1) If the host sends 250 Mbytes. This will take 100 seconds to transfer into the bucket at 2.5 Mbytes/s. 2) If the bucket drains at 2.0 Mbytes/s then it will have drained 100 * 2 = 200 Mbytes.

So I think you need a bucket which is 50 Mbytes capacity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top