diff options
author | Artturin <Artturin@artturin.com> | 2023-08-20 10:40:24 +0300 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2023-09-13 21:36:36 +0200 |
commit | 696353fcf4b6c290003344e0e26802db7c2eaf51 (patch) | |
tree | 087c8b9439f1085f029f6a7c621c29148de133a8 /nixos/modules/tasks | |
parent | 8e32f5b91d5263ff6e6ce939e85dfffc0c691185 (diff) | |
download | nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.tar nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.tar.gz nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.tar.bz2 nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.tar.lz nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.tar.xz nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.tar.zst nixpkgs-696353fcf4b6c290003344e0e26802db7c2eaf51.zip |
nixos/zfs: disable redundant scheduler
I (according to the comment) wrote this somewhere and since then it has spread to many configs. https://github.com/search?q=artturin+ENV%7BID_FS_TYPE%7D%3D%3D%22zfs_member%22%2C+ATTR%7B..%2Fqueue%2Fscheduler%7D%3D%22none%22&type=code https://github.com/NixOS/nixpkgs/issues/169457#issuecomment-1523873402
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 21d604bee6e..5cf863c87f2 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -662,6 +662,11 @@ in ]; }; + # ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when I nix build something. + services.udev.extraRules = '' + ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ENV{ID_FS_TYPE}=="zfs_member", ATTR{../queue/scheduler}="none" + ''; + environment.etc = genAttrs (map (file: "zfs/zed.d/${file}") |