Linux: Limit Transfer Bandwidth
2015-01-01
Transferring files to a server will often ending up in fully utilizing your upload bandwidth.
Download bandwidth gets slow because SYN-ACK are not coming through.
Here are the option to limit the bandwidth.
Software
scp
scp -r -l 200 server:/path/ .
200 means 200kbit/s = 25KB/s
rsync
rsync -a --progress --partial --bwlimit=25 server:/path .
25 means 25KB/s
curl/wget
curl --limit-rate 400K wget --limit-rate=400k
400K means KB/s
Simulate Slow/Bad Networks
In case you need to limit other application and/or test how they behave in different networks you should have a look at those tools:
http://www.linuxfoundation.org/collaborate/workgroups/networking/netem
http://wanem.sourceforge.net/