RHEL 8/9 and CentOS 7
I have backup scripts that utilize rsync. When I am running a backup it pretty much consumes my network connection, be it it wifi or sometimes even cat-5. I am wondering if there is a way to (within the script) 'throttle' rsync by like 10% or whatever? I'd just like it to not over-ride other programs also trying to use the connection.
I've looked into the rsync switches but didn't see anything obvious to me.
Thank you.
Throttling rsync (curiosity question mostly)
-
- Posts: 1464
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: Throttling rsync (curiosity question mostly)
You mean like --bwlimit=RATE limit socket I/O bandwidth ?
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
-
- Posts: 1464
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: Throttling rsync (curiosity question mostly)
Thank you -- clearly I (again) got distracted while looking - I'm always "doing 18 things at a time".
-
- Posts: 1464
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: Throttling rsync (curiosity question mostly)
This works really great - UNTIL rsync reads the end of the file and then the cache begins emptying unrestricted. The result is back to a "hung" network until the cache empties.
Without turning off write-caching entirely, can I somehow 'adjust' it? I looked at https://linuxconfig.org/improve-hard-dr ... ck-caching
Thanks
Without turning off write-caching entirely, can I somehow 'adjust' it? I looked at https://linuxconfig.org/improve-hard-dr ... ck-caching
Thanks
Re: Throttling rsync (curiosity question mostly)
You could try playing with the various sysctls like these ones:
vm.dirty_writeback_centisecs = 200
vm.dirty_ratio = 15
vm.dirty_background_ratio = 3
vm.dirty_expire_centisecs = 500
vm.swappiness = 3
vm.vfs_cache_pressure = 170
vm.dirty_writeback_centisecs = 200
vm.dirty_ratio = 15
vm.dirty_background_ratio = 3
vm.dirty_expire_centisecs = 500
vm.swappiness = 3
vm.vfs_cache_pressure = 170
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke