Re: Leaky bucket algorithm
Re: Leaky bucket algorithm
- Subject: Re: Leaky bucket algorithm
- From: "Peter Sichel" <email@hidden>
- Date: Tue, 13 Jun 2006 16:39:59 -0400
On 6/13/06, Scott Ribe wrote:
>>> What are you actually trying to accomplish?
>>
>> To actually limit the _current_ speed and distribute the traffic
>> evenly during the one second window.
>
>Depends on you definition of "_current speed" and "evenly"...
>
>Network transmissions are packetized, and any single packet will go out at
>the current "wire speed" of the hardware. You can break up your transmission
>into smaller and smaller packets, but you can't make the bytes of a single
>packet transmit more slowly, nor is there any way to allow bytes from other
>processes to be sent in between bytes of your single packet. So network
>traffic at short time scales is always bursty to that degree. You could
>transmit a single byte at a time, which would result in the shortest
>possible packets being sent, which would be closer to an "even" spread, but
>then your own process' performance would be terrible because of the huge
>overhead/payload ratio.
In this case I think he means smoothing out the traffic flow and sharing
the total available bandwidth more evenly.
The basic behavior of a TCP/IP connection during bulk data transfer is
to suck up as much bandwidth as it can get. This isn't always desirable
when other users and applications wish to share the network.
In my implementation, each packet is sent at wire speed, but I target 10
window moves per second. This means each connection is allowed to send
10 bursts per second with the size of each burst limited based on the
target rate limit. This provides smooth control over the per second
traffic rate, reasonable network responsiveness to other applications,
and reasonable overhead of 10 rate control operations per second (to
spool out window advertisements as needed).
Since you can't go faster than the window size times the RTT (bandwidth-
delay product), as the rate limit increases you either need to send
larger window advertisements, or send them out more frequently.
Enjoy!
- Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden