Selectable I/O schedulers for 2.6
What has been lacking is any sort of way for a system administrator to choose between these schedulers. A system I/O scheduler can be designated with the elevator= boot parameter, but that choice applies to all drives on the system, and it cannot be changed. This restriction makes experimenting with the various schedulers difficult; in the real world, it may also be appropriate to use different schedulers for different drives.
So Nick Piggin has released a patch which makes I/O schedulers selectable at run time. With the patch, a new io_scheduler sysfs attribute appears under /sys/block/<device>/queue; changing a scheduler is simply a matter of writing the name of the new scheduler into that attribute. So, for example, to go to CFQ on the first SCSI drive:
echo cfq >/sys/block/sda/queue/io_scheduler
Changing schedulers requires pausing and emptying the I/O queue, so it
might not be advisable in the middle of writing a CD or controlling a
nuclear power plant shutdown. But it certainly can be a useful thing to do
at system initialization time, or while experimenting with scheduler
performance under a certain kind of load.
