You are not logged in.

#1 2019-09-11 09:14:29

biltong
Member
From: South Africa
Registered: 2011-09-01
Posts: 118

Setting IO scheduler in HyperV VM, udev says no such file or directory

I am trying to use the udev rule from https://wiki.archlinux.org/index.php/Improving_performance#Kernel's_I/O_schedulers to set the IO scheduler to NONE for my HyperV VM running Arch.

I have the following in /etc/udev/rules.d/99-ioschedulers.rules:

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

However it is not taking effect. I see in journalctl I am getting these errors:

Sep 11 11:01:05 arch systemd-udevd[266]: sdv_gpio: /etc/udev/rules.d/99-ioschedulers.rules:1 Failed to write ATTR{/sys/bus/pci/drivers/sdv_gpio/queue/scheduler}, ignoring: No such file or directory
Sep 11 11:01:05 arch systemd-udevd[277]: sda1: /etc/udev/rules.d/99-ioschedulers.rules:1 Failed to write ATTR{/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/d4939938-a527-4ba0-8351-764b0bb220e4/host0/target0:0:0/0:0:0:0/block/sda/sda1/queue/scheduler}, ignoring: No such file or directory
Sep 11 11:01:05 arch systemd-udevd[276]: sda2: /etc/udev/rules.d/99-ioschedulers.rules:1 Failed to write ATTR{/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/d4939938-a527-4ba0-8351-764b0bb220e4/host0/target0:0:0/0:0:0:0/block/sda/sda2/queue/scheduler}, ignoring: No such file or directory
Sep 11 11:01:06 arch systemd-udevd[277]: sdb1: /etc/udev/rules.d/99-ioschedulers.rules:1 Failed to write ATTR{/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/d4939938-a527-4ba0-8351-764b0bb220e4/host0/target0:0:0/0:0:0:2/block/sdb/sdb1/queue/scheduler}, ignoring: No such file or directory

It isn't wrong, there definitely isn't a queue directory there:

$ ls /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/d4939938-a527-4ba0-8351-764b0bb220e4/host0/target0:0:0/0:0:0:0/block/sda/sda1/
alignment_offset  dev  discard_alignment  holders  inflight  partition  power  ro  size  start  stat  subsystem  trace  uevent

Not really sure where to go from here?

Last edited by biltong (2019-09-11 09:17:26)

Offline

#2 2019-09-11 09:25:42

Omar007
Member
Registered: 2015-04-09
Posts: 334

Re: Setting IO scheduler in HyperV VM, udev says no such file or directory

biltong wrote:
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/scheduler}="none"

Clear out the * here so it looks like this instead:

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

EDIT: Did setting it manually work as expected? I'd assume so but you probably used `echo none > /sys/block/sda/queue/scheduler` (note the lack of a number after the 'a' of sda)
EDIT2: loqs expanded on why below

Last edited by Omar007 (2019-09-11 09:32:09)

Offline

#3 2019-09-11 09:29:11

loqs
Member
Registered: 2014-03-06
Posts: 9,090

Re: Setting IO scheduler in HyperV VM, udev says no such file or directory

To expand on Omar007's point your original rule matched partitions on devices not devices themselves.
While the property you want to change is a device property rather than a partition property.

Offline

#4 2019-09-11 09:38:17

biltong
Member
From: South Africa
Registered: 2011-09-01
Posts: 118

Re: Setting IO scheduler in HyperV VM, udev says no such file or directory

Thanks, removing the * worked!

Offline

Board footer

Powered by FluxBB