Skip to content

Instantly share code, notes, and snippets.

@theodric
Created November 9, 2025 22:35
Show Gist options
  • Select an option

  • Save theodric/29bda5e2e50ab89bb7b8b0eee336622e to your computer and use it in GitHub Desktop.

Select an option

Save theodric/29bda5e2e50ab89bb7b8b0eee336622e to your computer and use it in GitHub Desktop.
/etc/udev/rules.d/60-ioschedulers.rules
# Set BFQ for rotational HDDs
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
## Set mq-deadline for SATA SSDs
#ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
# Set none for SATA SSDs
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
# Set none for NVMe SSDs
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment