Problem with a sticky bucket?

I am trying to review my finale, and I pass on to the examples that my professor gave me. Can someone explain to me how a leaking bucket works. There is also a review problem that my professor gave me about leaking buckets.

The leaking bucket is located on the host network interface. The data transfer speed in the network is 2 MB / s, and the data transfer speed from the application to the bucket is 2 m MB / s

A.) Suppose a host has 250 MB to send to the network and sends data in one packet. What is the minimum bucket capacity (in bytes) so as not to lose data?

B.) Assume that the bucket capacity is 100 MB. What is the maximum packet time from the host so as not to lose data?

+4
source share
2 answers

A leaky bucket symbolizes a bucket with a small hole, allowing water (data) to go to the bottom. Since the top of the bucket has a larger diaphragm than the bottom, you can quickly pour water into it so that it goes out (so that the bucket fills up).

Basically, it is a buffer on the network between two links with different speeds.

Problem A

We can calculate that sending data will take 250 MB / (2.5 MB / s) = 100 s.

During this 100 seconds, the bucket will be retransmitted (leaked) 100 s * 2 MB / s = 200 MB

Thus, a bucket will require a minimum capacity of 250 MB - 200 MB = 50 MB, so as not to lose any data.

Problem B

Since the difference between the two data transfer rates is 2.5 MB / s - 2.0 MB / s = 0.5 MB / s, this means that the total bit is filled at 0.5 MB / s (when both lines transmit to full power).

Then you can calculate that 100 MB capacity will be full after a surge of 100 MB / 0.5 MB / s = 200 s = 3 m 20 s

+5
source

An interesting problem is my attempt to solve A (there are no guarantees, although this is true!)

So, the speed is = 2.5, the speed is out = 2.0, where the speed is in MB / s.

So, after 1 second the bucket will contain 2.5 - 2.0 = 0.5 MB.

1) If the host sends 250 MB. It takes 100 seconds to transfer to the bucket at a speed of 2.5 MB / s. 2) If the bucket is depleted at a speed of 2.0 MB / s, it will be depleted 100 * 2 = 200 MB.

So, I think you need a 50 MB bucket.

+1
source

Source: https://habr.com/ru/post/1332794/


All Articles