Pcornel
Storage · ZFS

ARC

Cheat sheet · https://pcornel.dk/topic.php?topic=4020

Back to the Topic

Answer

ARC uses system memory to cache ZFS blocks and metadata and adapts between recently and frequently used content. ARC occupancy is dynamic and competes with application memory according to platform memory-management behavior. High ARC hit ratio can reduce backend reads, but it does not make the pool or media healthy and must be interpreted with workload size and memory pressure.

Remember

  • ARC ≠ L2ARC.
  • ARC memory use ≠ leak by itself.
  • High ARC hit ratio ≠ backend health.
  • Low ARC hit ratio ≠ automatically a problem for streaming or one-pass workloads.

First checks

  • arc_summary | head -50 — ARC size and hit rate
  • cat /proc/spl/kstat/zfs/arcstats | grep -E '^(size|c_max|hits|misses)' — raw stats
  • cat /sys/module/zfs/parameters/zfs_arc_max — limit

Verify in this order

read → ARC hit? → else disk → cache

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

ZFS → ARC ZFS map

ZFS boundaryWhat to verifyProof limit
Identity / topologyPool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective propertiesObject presence alone does not prove integrity, performance or recovery
Capacity / protectionPool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver stateFree space or ONLINE state at one layer does not prove end-to-end health
Failure boundaryAn ARC hit proves the requested block was served from RAM cache at that moment; it does not prove backing storage latency, durability or future hit probability.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: ARC behavior matches workload locality, memory pressure is controlled, miss-driven backend I/O is sustainable, and application latency meets baseline.Close only after original workload plus checksum/read-back/recovery verification succeeds

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4020

Confirmation

Confirm action

Continue?