13

My Debian Wheezy systems use the deadline scheduler. I'm accustomed to using ionice to reschedule the I/O priority of disk-intensive jobs at busy times, and anecdotally this seems to help (but I don't have any hard evidence).

The ionice manpage, kernel documentation and this OpenSUSE document all suggest that only the cfq scheduler takes into account ionice interventions. They don't explicitly state that other schedulers ignore it, but the only one they mention is cfq.

Do other schedulers, in particular deadline, work with ionice?

11

No. ionice is a mechanism for specifying priorities. But deadline ignores priorities and instead simply imposes an expiration time on each I/O operation and then ensures that the operation succeeds before the expiration time is met.

More information here: the Deadline I/O scheduler

The main goal of the Deadline scheduler is to guarantee a start service time for a request. It does so by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.

Before serving the next request, the deadline scheduler decides which queue to use. Read queues are given a higher priority, because processes usually block on read operations. Next, the deadline scheduler checks if the first request in the deadline queue has expired. Otherwise, the scheduler serves a batch of requests from the sorted queue. In both cases, the scheduler also serves a batch of requests following the chosen request in the sorted queue.

By default, read requests have an expiration time of 500 ms, write requests expire in 5 seconds.

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.