site  contact  subhomenews

IO schedulers fix for Linux kernel

May 16, 2022 — BarryK

Running Easy Bookworm today, I did this:

# cat /sys/block/sdb/queue/scheduler 
[none]

...huh, where are "deadline", "cfq", etc. I/O schedulers?

I have fallen behind here. Unknown to me, those schedulers have been deprecated for the last couple of years, and now completely gone from the kernel.

What kernel version did this happen? How long have I been running Easy with "none" I/O scheduling? Haven't noticed any performance degradation.

Actually, "none" still does have very basic I/O scheduling.

The kernel config shows this:

# IO Schedulers
#
# CONFIG_MQ_IOSCHED_DEADLINE is not set
# CONFIG_MQ_IOSCHED_KYBER is not set
# CONFIG_IOSCHED_BFQ is not set
# end of IO Schedulers

These are the new ones. I have compiled the kernel 5.15.40 with these enabled, now get:

# cat /sys/block/sdb/queue/scheduler 
[mq-deadline] kyber bfq none

Kernel compiled for Easy Bookworm, will do same for Dunfell soon.

EDIT 2022-05-17:
I compiled 5.15.40 kernel for Easy Dunfell also.

The kernel defaults to "mq-deadline" I/O scheduler, so I have created /etc/udev/rules.d/60-io-scheduler.rules:

ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

...because it looks like "bfq" is good choice for HDDs.

Um, not sure about using a udev rule, could do it in rc.sysinit. 

Tags: easy