How could I change scheduler to deadline?

Hi All

I want to change my scheduler to deadline.

I tried to create new file to two place below.

/etc/udev/rules.d/60-ioschedulers.rules
/etc/udev/rules.d/60-schedulers.rules

And tried two commands below, but all doesn’t work.

ACTION==“add|change”, KERNEL==“sd[a-z]”, ATTR{queue/rotational}==“0”, ATTR{queue/scheduler}=“deadline”
ACTION==“add|change”, KERNEL==“sd[a-z]|mmcblk[0-9]|nvme[0-9]”, ATTR{queue/rotational}==“0”, ATTR{queue/scheduler}=“mq-deadline”

Which one is correct? Thank you.

that is the corect path
and this is the correct way to do have it in the file

# set deadline scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
# set bfq scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
# set mq-deadline scheduler for non-rotating nvme-disks
ACTION=="add|change", KERNEL=="nvme[0-9]n1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
1 Like

Thank you.

When I done, and reboot.
But the system showed “[mq-deadline] kyber bfq none”.

My system still no changed to deadline. Why?

You are using mq-deadline , which is deadline for multiqueue. Keep in mind that the original deadline is not available with multiqueue. If you don’t want to use multiqueue you would need to use an old Linux Kernel.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.