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

http://www.cyberciti.biz/faq/throttle-disk-io-rate-limit-disk-io/

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:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值