Pcornel
Storage · ZFS

Cache

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

Back to the Topic

Answer

ZFS serves reads from ARC when possible and can extend the reusable read working set with L2ARC devices. Cache contents are secondary copies; authoritative data remains in the pool. Cache effectiveness depends on workload locality, working-set size, memory pressure, prefetch behavior and backend latency.

Remember

  • Cache hit ≠ backend health.
  • L2ARC cache device ≠ redundancy.
  • Cache warmth ≠ steady-state production behavior.
  • More cache capacity ≠ lower latency when the workload has little reuse.

First checks

  • zpool status — cache devices
  • arc_summary — ARC and L2ARC stats
  • zpool iostat -v 1 — cache device I/O

Verify in this order

RAM ARC → L2ARC → disks

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 → Cache 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 boundaryA cache hit proves that one request avoided the lower pool path; it does not establish the latency or integrity of the uncached backend path.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: cache behavior materially matches workload locality, memory remains healthy, and backend pressure plus end-user latency improve without hiding storage faults.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=4025

Confirmation

Confirm action

Continue?