Repository navigation
Use the kyber I/O scheduler on real disks - #11653
Merged
Merged
Conversation
The kernel leaves NVMe on none and everything else on mq-deadline. Neither bounds latency once the device queue fills, so a large build, copy, or package upgrade can make the desktop sluggish while reads wait behind a wall of writes. Kyber keeps separate read and sync-write queues and throttles the depth it submits to hit a 2ms read target, which keeps interactive reads flowing under heavy writes at negligible CPU cost. The trade is a small ceiling on peak throughput on very fast devices, which matters for a storage server chasing IOPS but not for a desktop. Ships as a package-owned udev rule in /etc so it applies at boot and on hot-plug. Existing installs pick it up at the next boot. zram is left alone since it has nothing to schedule. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
udev patterns are shell globs, so nvme[0-9]*n[0-9]* also matched every partition. Partitions have no queue/scheduler, and udev logged a "Could not chase sysfs attribute" for each one at boot. Restrict the match to SUBSYSTEM block with DEVTYPE disk, which also keeps mmcblk boot areas and NVMe multipath nodes out. Reword the comment: kyber targets a read latency rather than bounding it, and the kernel's default choice depends on the device rather than being a fixed NVMe versus everything-else split. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
|
This is a good change. It seems harmless to me. |
dhh
marked this pull request as ready for review
September 13, 2026 14:45
dhh
added a commit
to omacom/omarchy-pkgs
that referenced
this pull request
Sep 13, 2026
omacom/omarchy#11653 added etc/udev/rules.d/60-omarchy-io-scheduler.rules. package() already ships the whole etc/ tree, so the rule lands on new installs with the next build; list it in backup= so pacman keeps a user's local edit of the rule across upgrades, like the other package-owned /etc drop-ins. Claude-Session: https://claude.ai/code/session_01EqYNBv5cERVom2zox5epyE Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The kernel's default scheduler choice is
noneormq-deadlinedepending on the device. Neither regulates latency once the device queue fills, so a large build, copy, or package upgrade can make the desktop sluggish while interactive reads wait behind a wall of writes.Change
A package-owned udev rule in
/etc/udev/rules.dsetskyberon nvme, sd, mmcblk, and vd whole disks at boot and on hot-plug. Partitions and zram are not matched. Zoned btrfs disks are still moved back tomq-deadlineby the later64-btrfs-zoned.rules.Kyber keeps reads in their own queue and throttles the depth it submits to hold a 2ms read latency target, so reads keep flowing under heavy writes at low CPU cost. The trade is a possible small ceiling on peak throughput on very fast devices, which matters for a storage server chasing IOPS but not for a desktop. Users who want something else can override it with a later-numbered rule.
The rule applies to rotational disks and USB storage as well. If we'd rather keep those on the kernel default, adding
ATTR{queue/rotational}=="0"to the match narrows it to SSDs.Existing installs pick it up at the next boot, same as the zram/sysctl tuning. It needs no migration.
Verification
udevadm verifypasses on the rule file.udevadm test --action=changematches both disks, does not match their partitions or zram0, and the live trigger moved the disks fromnone/mq-deadlinetokyber.DEVTYPE=="disk"../test/all:test/shell.d/config-test.shandtest/shell.d/locate-test.shfail, same as on a cleanquattrocheckout, so they are unrelated.🤖 Generated with Claude Code