Throttle The Disk I/O Rate: Limit disk I/O for rsync Tool

by Vivek Gite on July 5, 2008 · 1 comment

Q. 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'd like to reduce both disk I/O and network I/O. I've 10Mbps server connection and 160GiB SATA hard disk. How do reduce disk I/O so that the entire system doesn't die or become unresponsive?

A. This is well known issue. There are two methods to control or throttle the disk and network I/O rate under UNIX / Linux.

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

ionice command provide more control as compare to nice command. This program sets the io scheduling class and priority for a program or script. You can totally control disk i/o. Please see following article for detailed examples:

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 1 comment… read it below or add one }

1 anonymous December 8, 2011

Thanks

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 12 + 9 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the simple math so we know that you are a human and not a script.




Previous post:

Next post: