Skip to content

Request to add options for configuring the IO scheduler for NixOS #57577

Closed
@CMCDragonkai

Description

@CMCDragonkai

Right now there's no option for NixOS users to configure the IO schedulers for the disk block devices.

To do this right now, one has to write an activation script that iterates over each block device and sets the IO scheduler.

Something like this:

    system.activationScripts.diskScheduler = ''
      for path in "''${disks[@]}"; do
        echo noop >/sys/block/$(
          ${pkgs.coreutils}/bin/basename $(
            ${pkgs.coreutils}/bin/readlink -f $path
          )
        )/queue/scheduler
      done
    '';

It would be really nice and robust, if NixOS had dedicated option to do this. It would have to be configurable on each block device. So it would not correspond to the fileSystems option. Instead it would be more closer to the swapDevices option. Perhaps we should have a blockDevices option in general that organises all the options relating to connected block devices (which would have to be separate from udev like devices).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions