≡ Menu

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

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:

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 6 comments… add one }
  • anonymous December 8, 2011, 11:00 am


  • anonymous February 7, 2012, 2:05 am

    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


    • anon March 24, 2013, 8:55 am

      redking… it’s as “compared to” not “as compare” to… check your grammar too if you wanna complain :)

      • asdf@asdf.tld July 25, 2013, 3:33 pm

        @anon, if you’re going to use quotes to illustrate the difference between original and corrective syntax, then you should use the quotes around the same group of words. Let me fix your poor correction to redking.

        Should be “as compared to”, not “as compare to”

        But then again, redking also missed pluralizing of provides.

        Here is the final corrected sentence that both of you screwed up:

        The ionice command provides more control as compared to the nice command.

        You are welcome.

  • Michael Mounteney August 30, 2012, 12:52 am

    Hilarious ! English as she is spoke.

  • Balu November 19, 2012, 1:40 pm

    Thank you
    server load due to rsync was driving me mad

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , ,