5

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' [email protected]:/var/www/* /var/www/

3 Answers 3

4

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' [email protected]:/var/www/* /var/www/

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

1
  • 2
    In the man page, it says "KBytes per second", so you might want to be more precise in your statement. Commented Sep 17, 2013 at 13:47
3

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.

1

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:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .