Tuesday, April 16, 2013

ionice is Pretty Darn Nice on IO

I have not often used 'ionice' but I really should be. 'ionice' does for disk IO on linux what standard 'nice' does for processor load. The standard implementation of ionice under linux allows for 3 settings, "Best Effort" "Idle" and "Real Time". The Best Effort setting is the default setting for new processes. Real Time grants priority access above Best Effort. And "Idle" is granted disk access only when another process is not trying to access disk. In this case, we are interested in Idle.

Class:
0 = 2 = None = Best Effort (Medium Priority)
1 = Real Time (High Priority)
3 = Idle (Low Priority)

A standard example would be:
ionice -c3 aide.wrapper --update

This can be used in combination with standard 'nice' to create a uber nice process

ionice -c3 nice -n 19 aide.wrapper --update

References:
Fried CPU
switch-sched.txt in Kernel Source

No comments:

Post a Comment