switching-sched.txt 1.4 KB

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