switching-sched.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ===================
  2. Switching Scheduler
  3. ===================
  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. It is possible to change the IO scheduler for a given block device on
  12. the fly to select one of mq-deadline, none, bfq, or kyber schedulers -
  13. which can improve that device's throughput.
  14. To set a specific scheduler, simply do this::
  15. echo SCHEDNAME > /sys/block/DEV/queue/scheduler
  16. where SCHEDNAME is the name of a defined IO scheduler, and DEV is the
  17. device name (hda, hdb, sga, or whatever you happen to have).
  18. The list of defined schedulers can be found by simply doing
  19. a "cat /sys/block/DEV/queue/scheduler" - the list of valid names
  20. will be displayed, with the currently selected scheduler in brackets::
  21. # cat /sys/block/sda/queue/scheduler
  22. [mq-deadline] kyber bfq none
  23. # echo none >/sys/block/sda/queue/scheduler
  24. # cat /sys/block/sda/queue/scheduler
  25. [none] mq-deadline kyber bfq