ZFS defaults
2027-11-26
so my freebsd storage server has been serving me well, no issues for a long time.
Until now. I started setting up some "automatically remux video files for copatibility queue" and everytime i started a remux with ffmpeg, the entire storage server locked up.
Turns out, by default zfs is allowed to use almost the entire system memory as cache. i don't run much on my server, but apparently just enough to fail when doing remuxing (fail as in, system memory completely fills up, entire machine locks up, symptopms similar to how when Linux ram fills up it starts "thrashing").
The handbook documents this:
https://docs.freebsd.org/en/books/handbook/zfs/#zfs-advanced
you need to set an upper limit for the ARC cache. my 32GB RAM box isn't bad but i have now limited it to 12GB to leave plenty of headroom, before it really would fill up all of it.
i put this in my /boot/loader.conf
vfs.zfs.arc_max="12G"
and hopefully this will take care of it. So far no issues.