Cache
Cheat sheet · https://pcornel.dk/topic.php?topic=4025
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 devicesarc_summary— ARC and L2ARC statszpool 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 boundary | What to verify | Proof limit |
|---|---|---|
| Identity / topology | Pool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective properties | Object presence alone does not prove integrity, performance or recovery |
| Capacity / protection | Pool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver state | Free space or ONLINE state at one layer does not prove end-to-end health |
| Failure boundary | A 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 |
| Acceptance | Healthy 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