diff --git a/modules/zfs.nix b/modules/zfs.nix index 7541f16..c91c0d7 100644 --- a/modules/zfs.nix +++ b/modules/zfs.nix @@ -24,31 +24,8 @@ in boot.initrd.kernelModules = [ "zfs" ]; boot.kernelParams = [ - # 120s TXG timeout: batch more dirty data per transaction group so the - # HDD pool (hdds) writes larger, sequential I/Os instead of many small syncs. - # This is a global setting (no per-pool control); the SSD pool (tank) syncs - # infrequently but handles it fine since SSDs don't suffer from seek overhead. - "zfs.zfs_txg_timeout=60" - - # Cap ARC to prevent it from claiming memory reserved for hugepages. - # Without this, ZFS auto-sizes c_max to ~62 GiB on a 64 GiB system, - # ignoring the 11.5 GiB of hugepage reservations. + "zfs.zfs_txg_timeout=30" "zfs.zfs_arc_max=${toString arcMaxBytes}" - - # vdev I/O scheduler: feed more concurrent reads to the block scheduler so - # mq-deadline has a larger pool of requests to sort and merge into elevator sweeps. - # Default async_read_max is 3 — far too few for effective coalescence. - # 32 was empirically optimal (64 overwhelmed the drives, 3 gave near-zero merges). - "zfs.zfs_vdev_async_read_max_active=16" - "zfs.zfs_vdev_async_read_min_active=4" - - # Merge reads within 128 KiB of each other (default 32 KiB). On HDDs, reading a - # 128 KiB gap is far cheaper than a mechanical seek (~8 ms). - "zfs.zfs_vdev_read_gap_limit=131072" - - # Allow ZFS to aggregate I/Os up to 4 MiB (default 1 MiB), matching the - # libtorrent piece extent size for larger sequential disk operations. - "zfs.zfs_vdev_aggregation_limit=4194304" ]; boot.supportedFilesystems = [ "zfs" ];