$linuxjunkies
>

L2ARC

also: Level 2 Adaptive Replacement Cache

L2ARC is a ZFS feature that uses fast storage (like SSDs) as a second-level cache between main memory and slower disks to improve read performance.

L2ARC stands for Level 2 Adaptive Replacement Cache. It extends ZFS's in-memory caching by storing frequently accessed data on fast solid-state drives, bridging the performance gap between RAM and mechanical disks.

When data is read from a ZFS pool, it's first cached in ARC (the in-memory cache). If ARC fills up and data is evicted, L2ARC preserves hot data on an SSD. Subsequent reads find data in the L2ARC layer much faster than fetching from slow disks, providing significant performance improvements for read-heavy workloads.

For example, a NAS might have 32GB of RAM (ARC) and a 500GB SSD configured as L2ARC, allowing caching of 500GB+ of frequently accessed files. Without L2ARC, evicted data would require slow disk I/O; with it, reads hit the SSD cache instead.

L2ARC is transparent to users and requires only designating a spare SSD or partition. It does not provide redundancy—loss of the L2ARC device only means losing the cache, not data itself.

Related terms