What is L2ARC?

What is L2ARC?

In the hierarchy of ZFS storage, RAM is king, but it’s also expensive and limited. L2ARC (Level 2 Adaptive Replacement Cache) is the "overflow" valve for your system's memory. It allows you to use fast flash storage (SSDs or NVMe) to extend your read cache, bridging the massive performance gap between your RAM and your high-capacity spinning disks.


1. The Middle Ground of Storage

To understand L2ARC, you have to look at the latency "cliff" in a typical server:

  • ARC (RAM): Near-instant (nanoseconds).

  • L2ARC (SSD): Very fast (microseconds).

  • Main Pool (HDD): Slow (milliseconds).

When your ARC (the primary cache in RAM) fills up, ZFS normally has to "evict" data to make room for new requests. Without an L2ARC, that evicted data is gone; if you need it again, you have to wait for the slow physical disks to find it. With an L2ARC, that data is "spilled" onto an SSD instead of being deleted.


2. How Data Moves to L2ARC

Data doesn't go straight from the disk to the L2ARC. It follows a specific lifecycle:

  1. Stage 1: Data is read from the disk and stored in the ARC (RAM).

  2. Stage 2: As the RAM fills up, the ARC identifies data that is "warm" but no longer fits in the "hot" RAM tier.

  3. Stage 3: Instead of being discarded, this data is written to the L2ARC device in the background.

  4. Stage 4: The next time a VM or Database asks for that data, ZFS pulls it from the SSD rather than the mechanical disks.


3. The "Hidden Cost" of L2ARC

A common mistake is thinking that adding a 2TB L2ARC is a "free" performance boost. It actually has a RAM overhead.

For every block of data stored in the L2ARC, a small piece of metadata (an entry in a table) must stay in the RAM ARC so ZFS knows where to find it on the SSD.

  • If you add a massive L2ARC to a system with very little RAM, you might actually decrease performance because the L2ARC metadata "steals" space from the much faster RAM cache.

  • The Rule of Thumb: Ensure you have at least 32GB–64GB of RAM before considering an L2ARC.


4. When Should You Use L2ARC?

L2ARC is not a "magic button" for every server. It is most effective in specific scenarios:

Ideal Use CaseWhy it Works
Virtualization (VMware/KVM)Caches "Boot Storms" and frequently accessed VM guest OS files.
Document ManagementKeeps thousands of small, frequently accessed files on flash.
Web ServersStores "hot" static content that is too large for RAM.
Large DatabasesCaches indexes that are larger than the available physical memory.

Pro Tip: If your "Working Set" (the data you access every day) fits entirely in your RAM, an L2ARC will do absolutely nothing for your performance.


5. Summary: ARC vs. L2ARC

FeatureARC (Adaptive Replacement Cache)L2ARC (Level 2 ARC)
Physical MediaSystem RAM.SSD / NVMe / Optane.
SpeedFastest possible.Very fast (but 10x–100x slower than RAM).
PersistenceLost on reboot (Volatile).Usually persistent (depending on version).
Primary GoalMinimize disk I/O.Expand cache capacity at low cost.

The Bottom Line

L2ARC is a cost-effective way to give a server "Terabytes of Cache" without spending tens of thousands of dollars on RAM. It transforms a slow, high-capacity storage pool into a hybrid powerhouse, provided you have enough RAM to manage the overhead.

Looking for servers Rental ?

Call Our Expert :


  • (call for rental enquiries)

Email us :