Linux – Rsync –bwlimit not working

linuxrsync

I am currently using rsync to transfert large file from a host to another.
I would like to limit the debit for this transfert. After reading the man page I found the option –bwlimit which is expecting a KB/s value.

I want to limit the transfert to arround 100Mbit/s
So I used the following settings :

rsync --progress -v --bwlimit=10000 --temp-dir=/tmp srv:/tmp/* /tmp/

But this doesn't seems to be respected according to the output of rsync :

file.sql.gz
   570851702 100%   33.90MB/s    0:00:16 (xfer#5, to-check=34/39)
file.sql.gz
    11195140 100%    7.45MB/s    0:00:01 (xfer#6, to-check=33/39)
file.sql.gz
    51439169 100%   19.41MB/s    0:00:02 (xfer#7, to-check=32/39)
file.sql.gz
       34022 100%    1.55MB/s    0:00:00 (xfer#8, to-check=31/39)
file.sql.gz
     2305698 100%    6.96MB/s    0:00:00 (xfer#9, to-check=30/39)
file.sql.gz
     2152942 100%    2.73MB/s    0:00:00 (xfer#10, to-check=29/39)
file.sql.gz
    86655633 100%   19.33MB/s    0:00:04 (xfer#11, to-check=28/39)
file.sql.gz
  3614476032  40%   34.82MB/s    0:02:28

If I'm not wrong : 19.33MB/s ~= 154Mbit/s

So what is wrong here ?

PS : rsync version 3.0.6 protocol version 30

Thanks for your help !

Best Answer

I think you experienced some "burstiness" as mentioned in the manpage:

--bwlimit=RATE
          ... 
          Some "burstiness" may be seen where rsync writes out a block 
          of data and then sleeps to bring the average rate into compliance.

So as I asked before the overall ratio at the end of your job was at last limited to 10M.

Related Question