nixCraft Linux Sys Admin Blog |
| How To Avoid Sudden Outburst Of Backup Shell Script / Program Disk I/O Posted: 03 Jun 2008 12:13 PM CDT A sudden outburst of violent disk I/O activity can bring down mail or web server. Usually, a web / mysql or mail server serving millions and millions pages per months are prone to this kind of problem. Backup activity can increase current system load from usual 5 to 20 (or more). To avoid this kind of sudden outburst problem, run your script with scheduling class and priority. Linux comes with various utilities to manage this kind of madness. CFQ schedulerYou need Linux kernels 2.6.13+ with the CFQ IO scheduler. CFQ (Completely Fair Queuing) is an I/O scheduler for the Linux kernel, which is default in 2.6.18+ kernel. RHEL 4/ 5 and SuSE Linux has all scheduler built into kernel so no need to rebuild your kernel. To find out your scheduler name, enter: /sys/block/sda/queue/scheduler => noop anticipatory deadline [cfq] /sys/block/sdb/queue/scheduler => noop anticipatory deadline [cfq] /sys/block/sdc/queue/scheduler => noop anticipatory deadline [cfq] CFQ is default and recommended for good performance. Old good nice programYou can run a program with modified scheduling priority using nice command (19 = least favorable): iosnice utilityionice command provide more control as compare to nice command. This program sets the io scheduling class and priority for a program or script. It supports following three scheduling classes (quoting from the man page):
How do I use ionice command?Linux refers the scheduling class using following number system and priorities:
To display the class and priority of the running process, enter: none: prio 0 Dump full web server disk / mysql backup using best effort scheduling (2) and 7 priority: Other suggestion to improve disk I/O
Further readings:
Related Posts:
© How To Avoid Sudden Outburst Of Backup Shell Script / Program Disk I/O - nixCraft - Support nixCraft when you shop at amazon. Thanks! | ||||||||||||
| Goosh.org Unix-like Shell For Google Posted: 03 Jun 2008 10:57 AM CDT Neat idea:
=> goosh.org Related Posts:
© Goosh.org Unix-like Shell For Google - nixCraft - Support nixCraft when you shop at amazon. Thanks! |
| You are subscribed to email updates from nixCraft Linux Sys Admin Blog To stop receiving these emails, you may unsubscribe now. | Email Delivery powered by FeedBurner |
| Inbox too full? | |
| If you prefer to unsubscribe via postal mail, write to: nixCraft Linux Sys Admin Blog, c/o FeedBurner, 20 W Kinzie, 9th Floor, Chicago IL USA 60610 | |
No comments:
Post a Comment