Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rsync limit transfer speed not working

Tags:

rsync

i'm trying to limit the bandwidth Rsync is using by specifying the --bwlimit option, but it doesn't seem to work. I don't know if i'm doing something wrong... :

The maximum possible upload speed = 10mbit/sec. I'd like to limit rsync to about 50% :

Rsync command =

[~] # rsync --version
rsync  version 3.0.7  protocol version 30

[~] # rsync -a --verbose --partial --bwlimit=500 -e 'ssh -p 2200 -i /share/ssh/id_dsa' [email protected]:/share/MD0_DATA/ /share/LocalData

Result =

Traffic

==============================================================================

Solution as provided below:

[~] # ipkg install trickle
Installing trickle (1.06-3) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts509/cross/unstable/trickle_1.06-3_i686.ipk
Installing libevent (2.0.16-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts509/cross/unstable/libevent_2.0.16-1_i686.ipk
Configuring libevent
Configuring trickle
Successfully terminated. 
[~] # trickle -d 500 rsync -a --verbose --partial -e 'ssh -p 2200 -i /share/ssh/id_dsa' [email protected]:/share/MD0_DATA/ /share/LocalData
trickle: Could not reach trickled, working independently: No such file or directory
receiving incremental file list
like image 640
Motsel Avatar asked Apr 08 '12 16:04

Motsel


1 Answers

--bwlimit=KBytes/s applies a moving average to throttle the resulting throughput, so you'll only notice it for a transfer which is considerably larger than your available bandwidth.

from the man pages,

blocks of data are sent, then if rsync determines the transfer was too fast, it will wait before sending the next data block. The result is an average transfer rate equaling the specified limit.)

Take a look into trickle which seems to take on this concept with a more refined algorithm.

like image 132
Joao Figueiredo Avatar answered Nov 18 '22 04:11

Joao Figueiredo