漏桶问题有帮助吗?

发布于 2024-10-08 04:24:55 字数 272 浏览 4 评论 0原文

我正在努力复习期末考试,并且正在复习教授给我的示例问题。谁能向我解释一下漏桶如何工作的概念。另外,这是我的教授给我的关于漏水桶的复习问题。

漏桶位于主机网络接口处。网络中的数据速率为 2 Mbyte/s,从应用程序到存储桶的数据速率为 2m5 Mbyte/s

A。)假设主机有 250 Mbytes 要发送到网络上,并且它以突发方式发送数据。为了不丢失数据,桶的最小容量(以字节为单位)应该是多少?

B.) 假设桶的容量为100M字节。为了不丢失数据,主机的最长突发时间是多少?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

格子衫的從容 2024-10-15 04:24:55

漏水桶象征着一个有小孔的水桶,可以让水(数据)从底部流出。由于水桶顶部的孔径比底部大,因此您可以将水放入其中,从而使其流出的速度更快(因此水桶会充满)。

基本上,它代表网络上具有不同速率的 2 个链路之间的缓冲区。

问题A

我们可以计算出发送数据需要250Mbyte / (2,5Mbyte / s) = 100 s。

在这 100 秒内,存储桶将重传(泄漏)100 秒 * 2Mbyte/s = 200Mbytes

因此,存储桶需要的最小容量为 250MB - 200MB = 50MB,以免丢失任何数据

问题 B

由于 2 个数据速率之间的差异为 2.5MB/s - 2.0MB/s = 0.5MB/s,这意味着降压填充了 0.5MB/s(当两个链路都满负荷传输时)。

然后可以算出,突发100MB/0.5MB/s = 200s = 3m 20s后,100MB容量就被填满了

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

赤濁 2024-10-15 04:24:55

有趣的问题 - 这是我解决 A 的尝试(但不能保证它是正确的!)

因此,速率输入 = 2.5,速率输出 = 2.0,其中速率以 Mbyte/s 为单位。

因此,在 1 秒内,存储桶将包含 2.5 - 2.0 = 0.5 MB。

1) 如果主机发送 250 MB。以 2.5 MB/s 的速度传输到存储桶需要 100 秒。
2) 如果桶以 2.0 Mbytes/s 的速度耗尽,那么它将耗尽 100 * 2 = 200 Mbytes。

所以我认为你需要一个 50 MB 容量的存储桶。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文