Thursday, June 26, 2008

Bandwidth Limiting SCP (Secure CoPy)

You can also limit the bandwidth scp may use when copying.
This is very useful if you want to copy a huge amount of data
without suffering from slow network for a long time. Limiting
bandwidth is done in this way:

$ scp -l bandwidthlimit_in_kbps username@remote_host:/path/to/file .

The bandwidth is specified in Kbit/sec. What does this mean?
Eight bits is one byte. If you want to copy no faster than
10 Kbyte/sec, set the limit to 80. If you want to copy no faster
than 80 Kbyte/sec, set the limit to 640. You should set the limit
to eight times the maximum Kbyte/sec you want it to be.
I would recommend to set the -l option with all scp'ing you do
on a connection that other people need to use, too. A big amount
of copying can virtually block a whole 10 Mbit network if you are
using hubs.

No comments: