--bwlimit not working right
rene.schumann at gmx.net
Mon Oct 20 17:54:17 EST 2003
Thanxs for you explicitely explanation.
Am Fre, 2003-10-17 um 17.23 schrieb John Van Essen:
> On 17 Oct 2003, Rene Schumann <rene.schumann at gmx.net> wrote:
> > Hello!
> > I cant get the bwlimit option working right.
> > If i set this option over 400 kbyte per sec i still only get 400kbyte
> > per sec, whether wich value i set.
> > I try this option with a 100MB big file.
> > I use a debian stable System with rsync version 2.5.6cvs protocol
> > version 26.
> > Can someone tell me how i can this get working?
> [ snip ]
> We use --bwlimit extensively and have experienced the same 400 kB limit.
> So you are doing nothing wrong. It's just the nature of the beast in
> the way that it is implemented.
> Linux systems have a granularity of 10 ms. Wait times cannot be
> shorter than that, and are rounded up if necessary.
> If you are pulling data (vs. pushing data) then rsync uses a buffer
> size of 4096.
> The forumla used to calculate the sleep time in microsecs is:
> bytes_written * 1000 / bwlimit
> 4096 * 1000 / 400 = approx. 10,000
> So attempts to use bwlimit greater than 400 ends up with a wait
> time that is rounded up to 10,000, which is effectively 409.6 kB/s
> given the 4096 byte buffeer size. Thus the apparent ceiling.
> There is a proposed patch to accumulate wait times to make it
> more accurate which would probably solve your problem. See this
> thread in the archives:
> A corrected patch is in the next message (7271).
More information about the rsync