linux/Documentation/block/switching-sched.txt
<<
>>
Prefs
   1To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
   2'noop', 'as' and 'cfq' (the default) are also available. IO schedulers are
   3assigned globally at boot time only presently.
   4
   5Each io queue has a set of io scheduler tunables associated with it. These
   6tunables control how the io scheduler works. You can find these entries
   7in:
   8
   9/sys/block/<device>/queue/iosched
  10
  11assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted,
  12you can do so by typing:
  13
  14# mount none /sys -t sysfs
  15
  16As of the Linux 2.6.10 kernel, it is now possible to change the
  17IO scheduler for a given block device on the fly (thus making it possible,
  18for instance, to set the CFQ scheduler for the system default, but
  19set a specific device to use the anticipatory or noop schedulers - which
  20can improve that device's throughput).
  21
  22To set a specific scheduler, simply do this:
  23
  24echo SCHEDNAME > /sys/block/DEV/queue/scheduler
  25
  26where SCHEDNAME is the name of a defined IO scheduler, and DEV is the
  27device name (hda, hdb, sga, or whatever you happen to have).
  28
  29The list of defined schedulers can be found by simply doing
  30a "cat /sys/block/DEV/queue/scheduler" - the list of valid names
  31will be displayed, with the currently selected scheduler in brackets:
  32
  33# cat /sys/block/hda/queue/scheduler
  34noop anticipatory deadline [cfq]
  35# echo anticipatory > /sys/block/hda/queue/scheduler
  36# cat /sys/block/hda/queue/scheduler
  37noop [anticipatory] deadline cfq
  38
  39Each io queue has a set of io scheduler tunables associated with it. These
  40tunables control how the io scheduler works. You can find these entries
  41in:
  42
  43/sys/block/<device>/queue/iosched
  44