I run a backup script called /root/backup.sh which runs rsync command. However, rsync makes a lots of disk I/O and network I/O. I would like to reduce both disk and network I/O. My server has 10Mbps server connection with 160GB SATA hard disk. How do I reduce disk I/O so that the entire system does not die or become unresponsive?
This is a well known issue. There are two methods to control or throttle the disk and network I/O rate under UNIX / Linux while using the rsync command.
Method # 1: Limit I/O bandwidth
The --bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O banwidth to 10000KB/s (9.7MB/s), enter:
# rsync --delete --numeric-ids --relative --delete-excluded --bwlimit=10000 /path/to/source /path/to/dest/
Method # 2: Take control of I/O bandwidth using ionice utility
The ionice command sets the io scheduling class and priority for a program or script. You can totally control disk i/o. See the following article for detailed examples:
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop











{ 5 comments… read them below or add one }
Thanks
Check your grammar…. ionice command provide more control as compare to nice command.
should read:
The ‘ionice’ command provide more control as compare to the ‘nice’ command
r3dk1ng
redking… it’s as “compared to” not “as compare” to… check your grammar too if you wanna complain :)
Hilarious ! English as she is spoke.
Thank you
server load due to rsync was driving me mad