rsync ionice destination
Changing the rsync command or wrapping it in a shell script to include the ionice command/parameters is an option. Also, You can leverage the --rsync-path
option, which tells rsync which command to execute on the remote server. Something like --rsync-path="ionice -c2 -n7 rsync"
will ensure that ionice runs on the destination.
I'll add that ionice is not always effective, depending on the server configuration. It only works with the default CFQ I/O elevator. If you've done any storage system tuning, this approach may not be applicable.
Can you give an example of the load or help explain how started the systems become for resources during the copy? I would tend to delve deeper and see why an rsync, especially limited to the low rate you listed in your example, would cause so much trouble.
What are you copying? What is the hardware/OS setup?
Your rsync command launches rsync
command at the remote destination, too.
Try to put the following to your destination server root user .bashrc, in other words to to /root/.bashrc
alias rsync="ionice -c2 -n7 rsync"