ZFS: Difference between revisions

imported>Red-hood
No edit summary
imported>Parthenon
how to change ZFS ARC maximum size
Line 59: Line 59:
     };
     };
</syntaxhighlight>
</syntaxhighlight>
== Changing the Cache Size ==
ZFS has a complicated cache system.  The cache you're most likely to want to fiddle with is the called the ARC cache.
You can increase or decrease a parameter which represents approximately the maximum size of the ARC cache.  You can't set its actual size (ZFS does that adaptively according to its workload), nor can you set its exact maximum size.
To change the maximum size of the ARC cache to (for example) 12 GB, add this to your NixOS configuration:
<syntaxhighlight lang="nix">
boot.kernelParams = ["zfs.zfs_arc_max=12884901888"];
</syntaxhighlight>
In some versions of ZFS, you can change this parameter on the fly, but in NixOS 18.03 this is not possible.  (Nor is it possible in other versions of ZFS on Linux yet, according to Stack Exchange.)


== Automatic Scrubbing ==
== Automatic Scrubbing ==