Discussing the scheduling conundrum
We’ve discussed and explained how the different I/O scheduling flavors go about their business, but the selection of a scheduler should always be accompanied by benchmark results gathered through real application workloads. As mentioned earlier, most of the time, default settings might be good enough. It’s only when you try to achieve peak efficiency, you try and tinker with the default settings.
The pluggable nature of these schedulers means that we can change the I/O scheduler for a block device on the fly. There are two ways to do this. The currently active scheduler for a particular disk device can be checked through sysfs
. In the following example, the active scheduler is set to mq-deadline
:
[root@linuxbox ~]# cat /sys/block/sda/queue/scheduler [mq-deadline] none bfq kyber [root@linuxbox ~]#
To change the active scheduler, write the name of the desired scheduler to the scheduler file. For instance, to set the BFQ scheduler...