I have a machine that suffers periods of resource contention (CPU or Memory or Disk or some combination) and I don't want Rsync to add to the problem when that occurs. Is it possible to setup Rsync to that it "slows dow" or stops during periods of contention (effectively being lazy)?
1 Answer
It depends on the resource, but you can do the following:
- CPU: set the
nice
level of the process to a high value (lower it's priority) - Disk: set the
ionice
level of the process to an idle scheduling class - Network: use
tc
to set the network TOS or use the--bwlimit
arguement - Memory: Interesting one - there's some complex methods using systemd or cgroups.
See this thread for more details: Nice rsync on remote machine