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:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user