OpenZFS is celebrated for its cryptographic data integrity, copy-on-write snapshots, and robust RAID-Z topologies. However, running ZFS on Linux production hosts requires understanding the memory management dynamics of its Adaptive Replacement Cache (ARC). Unlike standard Linux page caches that release memory instantaneously, the ZFS ARC kernel module can lag under rapid allocation surges, triggering catastrophic system failures.

Why Does Default ZFS ARC Trigger Linux OOM Killer Events?

Principal Cloud Infrastructure Analyst’s Forensics:The Linux kernel memory management subsystem and the OpenZFS ARC communicate through asynchronous memory shrinker callbacks. When intensive workloads (like PostgreSQL or Docker) allocate memory faster than the ZFS shrinker can evict ARC cache pages, the Linux OOM killer panic-terminates critical production processes.

Our kernel performance testing lab evaluated write amplification factors, transaction commit latency, and memory allocation responsiveness across database workloads on Ubuntu 24.04 LTS.

Recordsize Tuning and Database Page Alignment

The most common ZFS misconfiguration is leaving dataset recordsize at the default 128 KB for database workloads. PostgreSQL writes in 8 KB pages, while MySQL InnoDB writes in 16 KB pages. Writing a single 8 KB page into a 128 KB ZFS record forces ZFS to read, modify, and rewrite the entire 128 KB block, creating crushing write amplification that degrades NVMe SSD lifespan.

ZFS Kernel Parameter Default Linux Value High-Throughput Tuned Value Systems Engineering Impact
zfs_arc_max 50% of physical host RAM 65%–75% (Dedicated storage host) Prevents memory contention with database engines
zfs_arc_min 1/32 of zfs_arc_max 25% of zfs_arc_max Guarantees minimum active cache reserve
zfs_dirty_data_max 10% of physical RAM (up to 4GB) 10% to 20% of RAM (up to 16GB) Smooths heavy transaction write bursts
zfs_txg_timeout 5 seconds 5 to 10 seconds Optimizes transaction group sync cycles to NVMe
recordsize (Dataset tuning) 128 KB default 16 KB (PostgreSQL) / 64 KB (MySQL) Matches storage block writes to database engine I/O
Declan Frost’s FinOps & Repatriation Verdict:

Never run OpenZFS on production database hosts without explicit ARC tuning. Set zfs_arc_max in /etc/modprobe.d/zfs.conf and match dataset recordsize to your database page size to eliminate write amplification and prevent kernel OOM panics.