Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run Debian Live as a persistent system on a 16 GB pen drive. This is my workhorse every day system. I was earlier plagued with continual delays and freezes due to slow write speeds. I have repartitioned the drive and aligned the partitions, resulting in what seems like a significant boost in speed, but I'm also wondering about whether changing the I/O scheduler would help.

There seem to be two candidates: deadline and noop. This page recommends deadline, and I just changed to that. It seems to have helped but the impression is purely subjective. However, the consensus on Stack Overflow seems to be that noop is best for flash devices (see here and here). But I'm not able to understand how a scheduler that does nothing - i.e. noop - can be more efficient.

Since I expect that I'd have to try out either for a week or so to see if it actually helps, I thought I'd ask if anyone has any idea which would be better.

share|improve this question

migrated from Jan 28 '13 at 7:47

This question came from our site for professional and enthusiast programmers.

up vote 6 down vote accepted

Flash devices should be better handled by a no-operation I/O scheduler. Although that's not a definitive answer. Keep reading.

A mechanical device (such as HDD) spends a lot of time in seeking operations, finding the right position on a disk plate to perform reading or writing. It does that by moving a mechanical head that has a limited speed. Although that speed seems quite high, flash devices don't require this, and are therefore faster by design.

The task of an I/O scheduler is mainly to group, reorder, and when possible, merge I/O operations. One of the main intents is to decrease the seeking penalty by lowering the amount of necessary seek operations.

That's why a NOOP scheduler is superior to most schedulers for flash devices. Having in mind there's no seek penalty incurred in any I/O operation, the scheduler does not need to do much. The less it does, the better. With very few CPU cycles required for each I/O operation, it's also very battery friendly.

On the other hand, DEADLINE may be a good fit if you are worried by I/O starvation, while your system is rarely going to be overloaded. The scheduler imposes a deadline to every I/O operation, which positively impacts on latency. It uses multiple queues to store operations and sorts them according to their deadline. By committing to these deadlines, it can guarantee no I/O starvation during normal CPU loads.

To conclude, there's no one size fits all. Every scheduler has its pros and cons. The best thing you can do IMHO is to read about Noop, Deadline, and SIO, and find which one fits better to your scenario. You could also test them for a period, and see how they react to your daily usage.

Ultimately, I did find a good forum post that seems accurate and covers the main advantages/disadvantages of each I/O scheduler.

share|improve this answer
Thanks for an excellent answer. SIO does not seem to be in the Debian Wheezy kernel, but not sure. I also felt that deadline would be better than noop because of the vast difference in read and write speeds on flash media (deadline prioritises reads over writes). However, at present, I seem to get widely varying performance with deadline. Meanwhile, someone else recommends the BFQ scheduler. – ShankarG Jan 28 '13 at 11:08
I found that deadline is better for my workload, noop causes I/O starvation and processes go freezes or stuck in d state when you do I/O intensive works in parallel ... – Student Oct 31 '14 at 9:34
As the Linux kernel evolves so do the I/O schedulers : « Switching to noop will get you a tiny benefit, but cfq detects and does all of the right things on non rotational disks nowadays so I just leave it as it. » Sums up this thread with benchmarks and references on the question (here is one more with different schedulers: And Auto switch the I/O scheduler with udev. – lliseil Sep 2 '15 at 1:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .