Commit | Line | Data |
---|---|---|
898bd37a MCC |
1 | =================== |
2 | Switching Scheduler | |
3 | =================== | |
4 | ||
23c76983 AB |
5 | Each io queue has a set of io scheduler tunables associated with it. These |
6 | tunables control how the io scheduler works. You can find these entries | |
898bd37a | 7 | in:: |
23c76983 | 8 | |
898bd37a | 9 | /sys/block/<device>/queue/iosched |
23c76983 AB |
10 | |
11 | assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, | |
898bd37a | 12 | you can do so by typing:: |
23c76983 | 13 | |
898bd37a | 14 | # mount none /sys -t sysfs |
23c76983 | 15 | |
8614b008 AH |
16 | It is possible to change the IO scheduler for a given block device on |
17 | the fly to select one of mq-deadline, none, bfq, or kyber schedulers - | |
18 | which can improve that device's throughput. | |
73af994c | 19 | |
898bd37a | 20 | To set a specific scheduler, simply do this:: |
73af994c | 21 | |
898bd37a | 22 | echo SCHEDNAME > /sys/block/DEV/queue/scheduler |
73af994c VK |
23 | |
24 | where SCHEDNAME is the name of a defined IO scheduler, and DEV is the | |
25 | device name (hda, hdb, sga, or whatever you happen to have). | |
26 | ||
27 | The list of defined schedulers can be found by simply doing | |
28 | a "cat /sys/block/DEV/queue/scheduler" - the list of valid names | |
898bd37a | 29 | will be displayed, with the currently selected scheduler in brackets:: |
73af994c | 30 | |
898bd37a MCC |
31 | # cat /sys/block/sda/queue/scheduler |
32 | [mq-deadline] kyber bfq none | |
33 | # echo none >/sys/block/sda/queue/scheduler | |
34 | # cat /sys/block/sda/queue/scheduler | |
35 | [none] mq-deadline kyber bfq |