how to limit scp or ftp transfer speeds
In my honest opinion, the best ftp or scp client available is lftp. It is available as packages for most unix’s and of course since it is GNU licensed it is also available as source. It is a highly feature rich client that has job control, which means it supports queueing of files and entire directories that you want to move between computers. I use this all the time to mirror entire directories recursively over SCP
Other Features
The program also supports multiple transfers at the same time, which in some cases is faster than running them in serial. It supports automatic reconnect in the event of loss of the FTP or SCP channel, and it will support a resume feature on the files that were being transfered.
One of the best features within LFTP that I like is the ability to limit the speed of the transfers to a specific bytes per second rate in both upload and download rates. This is very handy when you want to move 10GB of files over SCP but you want to keep this as a background activity which may take a few days to complete when slower DSL connections are involved. Not a problem, you can simply set the following within LFTP:
set net:limit-rate 40000:40000
This would set the download and upload speed to 40Kbps. Perfect for a slow directory mirror between a few slow speed Internet-connected sites.
Originally published on truman.net. See the archived copy.