[lug] Throttling rsync

Alisdair Davey ard at pergamentum.com
Thu Dec 22 15:22:19 MST 2005


> Hey all--
> 
> Does anyone know if it's possible to throttle the bandwidth used by=20
> rsync between two servers?  I have a backup job that copies several GB=20
> of data from one server to another, across the internet.  Although most=20
> of the time I'd want backups to proceed lickety-split, in this instance=20
> there's no rush and more importantly I'm paying for bandwidth usage at=20
> the 95th percentile.  These bursts of traffic lasting an hour or more=20
> push my overall bandwidth levels upward, costing me money in=20
> surcharges.
> 
> I could probably hack something together using iptables or iproute2--=20
> they could throttle bandwidth on a certain IP or something-- but I=20
> don't want to scale back the server as a whole.  It's just this single=20
> rsync process that needs to be slowed.

man rsync ...

 --bwlimit=KBPS
 
     This option allows you to specify a maximum transfer rate in kilobytes
     per second. This option is most effective when using rsync with large
     files (several megabytes and up).  Due to the nature of rsync
     transfers, 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. A
     value of zero specifies no limit.
	      
-- 
Dr Alisdair Davey                                 ard at pergamentum.com 
Pergamentum Solutions                             Tel: 1-303-981-9838
2066 Dailey Lane
Superior, CO 80027



More information about the LUG mailing list