Compare commits

..

3 Commits

Author SHA1 Message Date
c008fd2b18 zfs: don't specify zfs arc cache
Turns out, zfs is smart!
ZFS already has sane defaults, no sense in limiting the size of the cache.
2026-03-06 14:11:14 -05:00
3ccce88040 zfs: remove unneeded options 2026-03-06 13:47:06 -05:00
ad4d2d41fb zfs: tweak arc settings 2026-03-06 13:44:55 -05:00

View File

@@ -8,25 +8,8 @@
boot.zfs.package = pkgs.zfs;
boot.initrd.kernelModules = [ "zfs" ];
boot.kernelParams =
let
arc_gb = 32;
arc_mb = arc_gb * 1000;
arc_kb = arc_mb * 1000;
arc_b = arc_kb * 1000;
dirty_gb = 8; # Default value is 4GB, helps smooth writes
dirty_mb = dirty_gb * 1000;
dirty_kb = dirty_mb * 1000;
dirty_b = dirty_kb * 1000;
in
[
"zfs.zfs_arc_max=${builtins.toString arc_b}"
boot.kernelParams = [
"zfs.zfs_txg_timeout=120" # longer TXG open time = larger sequential writes
"zfs.zfs_dirty_data_max=${builtins.toString dirty_b}"
"zfs.zfs_delay_min_dirty_percent=80" # delay write throttling until 80% dirty (default 60%)
"zfs.zfs_vdev_async_write_max_active=30" # more concurrent async writes to vdevs (default 10)
"zfs.zfs_vdev_async_read_max_active=10" # more concurrent async reads for random I/O (default 3)
];
boot.supportedFilesystems = [ "zfs" ];