L2ARC
Cheat sheet · https://pcornel.dk/topic.php?topic=4021
Answer
L2ARC stores secondary copies of data that also exist in the pool and is populated from ARC according to ZFS policy. It can benefit read-heavy workloads whose reusable working set exceeds ARC, but it consumes memory for metadata and adds fill I/O. It is not a write cache, not redundancy and not a substitute for adding RAM when RAM is the actual constraint.
Remember
- L2ARC ≠ ARC/RAM.
- L2ARC ≠ write cache.
- L2ARC ≠ redundancy or backup because cached blocks also live in the pool.
- More L2ARC ≠ automatically faster; metadata and feed overhead can hurt constrained systems.
First checks
zpool status— cache vdevarc_summary | grep -A10 L2ARC— L2ARC hitszpool add <pool> cache /dev/nvme0n1— add L2ARC
Verify in this order
ARC evictions → L2ARC SSD → read hits
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 → L2ARC 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 | An L2ARC hit proves a secondary cached copy satisfied that read; it does not prove the original pool block is healthy or that L2ARC improves total workload performance. | Correlate ZFS evidence with both workload and lower device/path evidence |
| Acceptance | Healthy evidence: L2ARC serves meaningful reusable misses, reduces backend pressure without harmful memory/feed overhead, and workload latency improves under controlled comparison. | 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=4021