hardware.block.scheduler
Assign block I/O scheduler by device name pattern.
Names are matched using the udev(7) pattern syntax:
*
: Matches zero or more characters.
?
: Matches any single character.
[]
: Matches any single character specified in the brackets. Ranges are
supported via the - character.
|
: Separates alternative patterns.
Please note that overlapping patterns may produce unexpected results.
More complex configurations requiring these should instead be specified
directly through custom udev rules, for example via
config.services.udev.extraRules,
to ensure correct ordering.
Available schedulers depend on the kernel configuration but modern Linux systems typically support:
none
: No‐operation scheduler with no re‐ordering of requests. Suitable
for devices with fast random I/O such as NVMe SSDs.
mq-deadline
: Simple latency‐oriented general‐purpose scheduler.
kyber
: Simple latency‐oriented scheduler for fast multi‐queue devices
like NVMe SSDs.
bfq
: Complex fairness‐oriented scheduler. Higher processing overhead,
but good interactive response, especially with slower devices.
Schedulers assigned through this option take precedence over
config.hardware.block.defaultScheduler and
config.hardware.block.defaultSchedulerRotational but may be
overridden by other udev rules.
- Type
attribute set of udev rule value- Default
{ }- Example
{ "mmcblk[0-9]*" = "bfq"; "nvme[0-9]*" = "kyber"; }- Declared
- <nixpkgs/nixos/modules/hardware/iosched.nix>