The ionice man page says

A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period.

Where is this "grace period" defined? Is it visable/tunable (perhaps via /sys)?

  • 2
    What are you trying to do? OS and distribution version, please? – ewwhite Feb 24 '12 at 15:22
  • linux (any distribution with the CFQ io scheduler). – jhfrontz Feb 24 '12 at 15:47
  • I tend not to use the CFQ scheduler if I care about application performance. deadline or noop make more sense in many situations... Using either of those renders ionice unusable. What are you trying to do? – ewwhite Feb 24 '12 at 15:53
  • I'm trying to understand what the grace period is so that I can figure out if it makes sense for the load that I'm putting on a box. – jhfrontz Feb 24 '12 at 15:58

The grace period is 250 milliseconds.


There is an idle scheduling class, which only runs when nothing else
is using the disk. A grace period is defined for which idle has to
wait before getting disk access when other io has run. This defaults
to 250ms currently.

You didn't provide the OS version or distribution (and yes, it does make a difference), but the tunable for RHEL/CentOS 5+6 is defined here as fifo_expire_async in /sys/block/[device]/queue/iosched/ (where [device] is sda, sdb, cciss0, etc.).

  • If I'm understanding that RH page correctly, is it not actually slice_idle (and thus 8 ms)? – jhfrontz Feb 24 '12 at 16:42
  • 1
    The more I play around with this, the more I'm convincing myself that the grace period is zero. I'm on FC7 and I've tried writing some I/O intensive processes and assigning them to different scheduling classes . No matter how much I saturate the cfq-scheduled block device, I never see any blocking on the "idle" processes. I think maybe it's time for me to ask a more general question of "how do you test that ionice is actually working". – jhfrontz Mar 1 '12 at 15:24
  • I'm not sure. As I stated earlier, you may want to look at one of the other scheduler algorithms. I prefer deadline over cfq. – ewwhite Mar 1 '12 at 15:33
  • The more general question is over at serverfault.com/q/369382/95287 – jhfrontz Mar 14 '12 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.