Home

L2ARC

L2ARC, or Level 2 Adaptive Replacement Cache, is a caching component of the ZFS filesystem designed to extend the in-memory ARC by storing a subset of cached blocks on a fast second-level storage device, typically an SSD. The purpose is to improve read performance for data that is accessed frequently but does not fit entirely in RAM.

How it works: When a block is read, ZFS serves it from the ARC in memory. If

Management and considerations: L2ARC is largely automated by ZFS, with tunables to adjust its size and behavior

Relation to ARC: L2ARC complements the in-memory ARC by providing a second-level cache layer. It is one

See also: ZFS, ARC, OpenZFS.

the
block
is
evicted
from
ARC
but
still
likely
to
be
reused,
ZFS
may
cache
a
copy
of
the
block
in
the
L2ARC
on
the
SSD.
Should
the
same
block
be
requested
again,
it
can
be
served
from
L2ARC
rather
than
requiring
a
disk
read,
reducing
latency
and
I/O.
L2ARC
is
a
read-side
cache
and
does
not
cache
writes
directly.
on
supported
platforms.
It
requires
a
suitable
fast
SSD
or
similar
device
to
be
effective.
Benefits
are
most
pronounced
on
read-heavy
workloads
with
data
locality
and
when
RAM
is
insufficient
for
ARC.
If
the
SSD
is
slow
or
the
workload
has
little
locality,
L2ARC
may
offer
limited
improvement
and
can
add
extra
I/O
and
wear
on
the
caching
device.
component
of
ZFS’s
broader
caching
strategy,
alongside
the
RAM-based
ARC
and,
in
some
deployments,
metadata
caching.