By: Jeff Johnston

IO Scheduling Improvements

Thanks to a new IO scheduler in Linux Kernel 2.6 it is possible to achieve speed increases on standard desktop style workloads of up to 1000% according to Andrew Morton of Open Source Development Labs (OSDL). The speed increase is thanks to the wait-before-seek function of the anticipatory scheduler that is one of two IO scheduling policies in kernel 2.6. The two scheduling systems were benchmarked against each other on a variety of diffent builds and systems by OSDL and you can see the results here.

Anticipatory Scheduler (AS)

The Anticipatory Scheduler attempts to anticipate future read requests from processes. Linus Torvalds, original creator of Linux, told me "Basically, the anticipatory scheduler maintains some per-process statistics to try to guess whether there will be another dependent read 'soon'" and if the algorithm guesses that there will be another read access it will wait before returning to process the next request. This significantly decreases the back and forth seeking under some loads. The wait-before-seek enables one process to perform several similar reads in rapid succession without having to send the drive head back and forth repeatedly. It is using the AS that Morton experienced 1000% speed increases.

Deadline Scheduler

This 1000% speed increase is only on standard desktop type work loads, but there is a way to get increased performance for database servers and high disk performance systems. As mentioned earlier the anticipatory scheduler is just one of two scheduling policies on kernel 2.6, the other is the deadline scheduler. Morton claims "the deadline scheduler is faster for the short-and-seeky style database workloads (sometimes by up to 15%)". This new multi-queue method allows for greater interactivity by giving the read requests a better deadline than write requests thus ensuring that applications will rarely be delayed by read requests.

Affects on Advanced Filesystems

Hans Reiser, the lead developer for reiserfs, told me that while the upcoming release, reiser4, does not take advantage of any of the improvements in the IO scheduler "some tests we did suggest that Reiser4's allocate on flush makes it MUCH more efficient for multiple streams of I/O". He went on to say that there is discussion about adding file plugins that obey real time constraints and utilize scheduler plugins, but at this point it has not progressed beyond the discussion phase.

Stephen Tweed of Red Hat's Kernel Development team said that while the IO scheduling improvements in 2.6 had no direct effect on ext3 "There are many performance improvements in ext3 in 2.6 which are independent of the IO scheduling changes. In particular, the SMP locking is vastly improved, increasing scalability on large machines; and there is support for 'htree' indexed directories,
providing much better performance on large directories."

Votes + Comments
VERY informative! :D
13 Years
Discussion Span
Last Post by servertweak

Great paper!! Congratulations.

I'll read in deep and probably shift from 2.4 to 2.6 Kernel early.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.