4

I want to use two schedulers since I have a two Disks set for my system due to a separate HOME disk. Meaning I have SDA and SDB

Doing echo noop /sys/block/sda/queue/scheduler says permission denied with SUDO

I tried the suggested solution but it doesn't work anymore

/etc/udev/rules.d/60-schedulers.rules
ACTION=="add|change", KERNEL=="sda", ATTR{queue/scheduler}="noop"
ACTION=="add|change", KERNEL=="nvme0n1", ATTR{queue/scheduler}="noop"
cat /sys/block/nvme0n1/queue/scheduler 
[none] mq-deadline

The setting is to be system-wide

It could be like this

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator:sda=noop elevator:nvme0n1=noop"

Is this the correct line or do I need a comma between the two disk parameters?

userDepth
  • 1,970
  • 2
  • 27
  • 56
  • While not ideal, you could schedule that command in rc.local or with systemd to run on startup. The link below refers to upstart, which I believe is outdated but related. http://askubuntu.com/a/910/647604 – brndn2k Mar 10 '17 at 23:49
  • There's [a Debian Wiki entry that describes one method](https://wiki.debian.org/SSDOptimization#Low-Latency_IO-Scheduler): `sudo -i` followed by `apt install sysfsutils` followed by `echo "block/sda/queue/scheduler = noop" >> /etc/sysfs.conf`. That line might be wrong and need to be removed and then replaced using `none` instead of `noop`. – Chai T. Rex Mar 11 '17 at 00:30
  • @ChaiT.Rex How do I get this command's man page ? – userDepth Mar 11 '17 at 01:27
  • There's no real command or man page for the file. The contents of `/etc/sysfs.conf` after you install the package have a bit of an explanation of it, though. – Chai T. Rex Mar 11 '17 at 03:01
  • @userDepth - Deleted the answer as requested. – AnotherKiwiGuy Mar 11 '17 at 08:11

1 Answers1

5

You should use udev rule for that.

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

ACTION=="add|change", KERNEL=="sda", ATTR{queue/scheduler}="deadline"
Barafu Albino
  • 6,401
  • 1
  • 34
  • 42