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 am looking to throttle the upload speed of my file transfers during an rsync process.

Does --bwlimit=KBPS mean it sets the internet transfer speed, or the hard drive disk write speed?

--bwlimit=KBPS limit I/O bandwidth; KBytes per second

Also, in the manual it says

Rsync can also be run as a daemon, in which case the following options are accepted:

And that's where the description for --bwlimit=KBPS is listed.

Does that mean rsync has to be run in daemon mode in order to use that command?

IF... --bwlimit=KBPS is referring to the internet transfer speed of my files...

Can anyone provide an example of how I can alter my command line in order to limit the upload speed of my file transfers using rsync?

Here is what I am currently using:

rsync -avz -e 'ssh' someuser@server1.example.com:/var/www/* /var/www/
share|improve this question
add comment

3 Answers 3

up vote 3 down vote accepted

I tested with this extensively while I was setting up my in house yum repositories.

This option seems to be intended - and in my opinion much more useful for - daemon mode but it does work correctly between local files and over SSH as well.

In your case the following should work.

rsync --bwlimit=x -avz -e 'ssh' someuser@server1.example.com:/var/www/* /var/www/

The big thing to note is that the bwlimit option takes bytes per second not bits per second. That caused me some headaches until I reread the man page.

share|improve this answer
1  
In the man page, it says "KBytes per second", so you might want to be more precise in your statement. –  Jan-Philip Gehrcke Sep 17 '13 at 13:47
add comment

On more thing to add to this question is that bwlimit works file by file. If you're transferring millions of small files you'll never have a file transfer that lasts long enough to trigger the rate limiting. This has bitten my in the past when copying large maildir system when the average file was 10K.

share|improve this answer
add comment

Test it with a 1MB file, and see what you get! (-:

I think the reference here is to bandwidth type I/O even though the man page reference isn't clear. Check out these posts:

share|improve this answer
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.