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.
This commit is contained in:
2026-03-06 14:11:14 -05:00
parent 3ccce88040
commit c008fd2b18
2 changed files with 3 additions and 20 deletions

View File

@@ -8,25 +8,9 @@
boot.zfs.package = pkgs.zfs;
boot.initrd.kernelModules = [ "zfs" ];
boot.kernelParams =
let
# SEE: https://github.com/openzfs/zfs/pull/15437
# and https://blog.thalheim.io/2025/10/17/zfs-ate-my-ram-understanding-the-arc-cache/
arc_max_gb = (service_configs.gb_ram * 5) / 8;
arc_max_mb = arc_max_gb * 1000;
arc_max_kb = arc_max_mb * 1000;
arc_max_b = arc_max_kb * 1000;
arc_min_gb = 4;
arc_min_mb = arc_min_gb * 1000;
arc_min_kb = arc_min_mb * 1000;
arc_min_b = arc_min_kb * 1000;
in
[
"zfs.zfs_arc_max=${builtins.toString arc_max_b}"
"zfs.zfs_arc_min=${builtins.toString arc_min_b}"
"zfs.zfs_txg_timeout=120" # longer TXG open time = larger sequential writes
];
boot.kernelParams = [
"zfs.zfs_txg_timeout=120" # longer TXG open time = larger sequential writes
];
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.extraPools = [

View File

@@ -7,7 +7,6 @@ rec {
media_group = "media";
cpu_arch = "znver3";
gb_ram = 64;
ports = {
# public