Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server to which several other servers upload large files on a regular basis through rsync and scp. Several of them can upload fast enough to max out my server's internet connection, slowing things down for everything else.

How can I force them to go slower from my end? I can't make them to change anything on their systems, so using rsync's bwlimit option isn't possible.

All the systems have static IP addresses, so identifying them isn't a problem. Is there anything I can do with iptables or something similar to slow them down and free up my internet connection?

share|improve this question
    
Are you using the standalone rsync server, or rsync over ssh? The latter looks like an ssh connection to iptables, so the best you could do with iptables is throttle all the ssh connections from that IP (which would likely introduce lag to a normal ssh session even if you aren't typing 128000 WPM) –  DerfK Oct 16 '12 at 0:47
    
rsync over ssh. Throttling all connections from the IPs is ok - interactive SSH traffic won't come from those servers. –  Grant Oct 16 '12 at 11:28
add comment

2 Answers

scp has option "-l limit" that Limits the used bandwidth, specified in Kbit/s.

rsync has "-i --bwlimit=KBPS" for limiting bandwidth.

Check these out and ask in comments if any questions.

share|improve this answer
    
Those can only be used from the side initiating the transfer, which I am not. –  Grant Oct 16 '12 at 12:36
    
Should have read carefully :). Well I have tried some tcp packet shaper utilities for linux but never got them to work on server side. We ended up using network router to do the traffic limiting for us. For linux level, you can read more here: linuxquestions.org/questions/linux-networking-3/… –  R D Oct 23 '12 at 9:20
add comment

Try the -bwlimit option on the command being used to launch the daemon rsync. On Ubuntu and some other systems, this can be configured in /etc/default/rsync. Disclaimer: I have never tested this.

share|improve this answer
    
This option is only applied on a per-file basis, not on the entire stream, so if you have a bunch of small files, its effect is minimal. –  EEAA Oct 16 '12 at 1:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.