[Nix-dev] how to set the prefered IO scheduler for a disk on nixos ?

Peter Hoeg peter at hoeg.com
Fri Nov 11 04:34:05 CET 2016


Hi,

>   Is there a way to set the IO scheduler on a specific disk?

you can do this using udev rules so it happens to all SSDs:

services.udev.extraRules = ''
  # set deadline scheduler for non-rotating disks
  # according to https://wiki.debian.org/SSDOptimization, deadline is preferred over noop
  ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"
'';

This may be better than setting it individually.

--
Regards,
Peter


More information about the nix-dev mailing list