Stop ZFS from eating your entire memory budget for breakfast
By Saket Jain Published Linux/Unix
Stop ZFS from eating your entire memory budget for breakfast
Technical Briefing | 10/11/2026
You probably set up ZFS for the data integrity and the snapshots, and for a while, it worked great. Then you noticed your server acting sluggish during backups, or maybe the OOM killer started picking off your database process instead of the ballooning kernel cache. That is because the Adaptive Replacement Cache in ZFS is notoriously greedy, often trying to claim as much physical RAM as the system will let it get away with.
Why the ARC defaults hate your other applications
By default, ZFS will happily consume up to half of your total system RAM for its ARC. On a dedicated storage head, that is perfect. But if you are running an application stack alongside your storage, that cache is essentially stealing memory that your apps actually need for page cache or heap space. The kernel has to jump through hoops to reclaim that memory, and that is usually when your latency spikes start looking like mountain ranges in your monitoring dashboard.
echo 8589934592 > /sys/module/zfs/parameters/zfs_arc_max
- Use zfs_arc_max to set a hard ceiling on how much RAM the ARC can claim.
- Check your current usage with arcstat to see if you are actually cache-hit constrained or just wasting memory.
- Make sure you set the limit in /etc/modprobe.d/zfs.conf so it actually survives a reboot, or you will be back to square one after an update.
If you are setting this on a production node, take it down in increments. Don’t just starve the ARC overnight or you will see your read IOPS crater. Watch the cache hit ratios after you tighten the belt, and find the equilibrium where your apps have room to breathe but your disk heads aren’t seeking every time a user requests a file.
