Change IO Scheduler for your disks


Tomr

1 post in this topic Last Reply

Recommended Posts

More reading about the differences with different schedules. I wont copy-paste the internet here:

Benchmarks on NVME SSD - https://www.phoronix.com/scan.php?page=article&item=linux-56-nvme&num=1

Benchmarks on HDD - https://www.phoronix.com/scan.php?page=article&item=linux-50hdd-io&num=1

 

YMMW, you can only be sure what is best for you if you do the benchmarks yourself. How to change your schedulers and auto-apply them on every reboot?

 

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

 

Paste the code:

# set scheduler for NVMe
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
# set scheduler for SSD and eMMC
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
# set scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

 

Apply the settings (can be done when array is started):

 

udevadm control --reload
udevadm trigger

 

You are done, the schedulers should be changed. you can verify it by typing: cat /sys/block/sdg/queue/scheduler  (sdg is your device)

 

mq-deadline (default for everything in UnRAID) may be better for HDD's for high throughput, all depends on your use case.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.