UPGRD
← Home

Infrastructure

ZFS ARC, L2ARC and SLOG: Three Mechanisms, Three Different Problems

ARC, L2ARC and SLOG are often grouped together as ZFS cache devices. They do different jobs, and confusing them can waste hardware or weaken a storage design.

Home · · 5 min read · Updated November 26, 2026
  • ZFS
  • OpenZFS
  • NAS
  • Storage
  • SSD
  • Filesystems
ZFS storage tiers showing ARC in RAM, L2ARC on SSD, a separate synchronous-write log and the main pool.

Quick summary

ARC, L2ARC and SLOG are often grouped together as ZFS cache devices. They do different jobs, and confusing them can waste hardware or weaken a storage design.

Storage discussions often reduce ZFS tuning to a shopping list: add RAM, add an SSD cache, add a fast log device. That advice collapses three different mechanisms into one. ARC is a memory read cache. L2ARC is an optional secondary read cache. SLOG is a separate log device used to accelerate synchronous writes by handling ZFS’s intent log (ZIL). None is a universal performance switch.

ARC: the primary read cache

OpenZFS keeps recently useful data in the Adaptive Replacement Cache, or ARC, in RAM. ARC is the first place to look when repeated reads are slow: if the working set fits and accesses have useful locality, reads can avoid pool-device I/O. ARC also holds metadata, so a workload may benefit even when its application data is larger than memory. “More RAM” can help, but the benefit depends on what is repeatedly read and how memory is shared with the operating system and applications.

Do not infer success from an ARC hit ratio alone. A high ratio can coexist with an application bottleneck, and a low ratio may be expected for streaming reads that are not reused. Measure application latency and throughput alongside ARC hit/miss counters, memory pressure and device activity. The question is not whether a cache counter looks attractive; it is whether the workload is waiting on reads that the cache could serve.

L2ARC: a second read tier

L2ARC stores selected cached read data on a faster device, commonly SSD, to supplement ARC. It does not replace ARC or turn arbitrary storage into RAM. L2ARC has metadata and management costs, consumes device capacity and writes as entries are populated or maintained. In some OpenZFS configurations, metadata itself consumes ARC memory; behavior and tuning details vary by release.

It is most plausible when a repeatedly read working set is too large for RAM but small enough and predictable enough to benefit from a faster secondary tier. It is unlikely to rescue one-pass sequential scans or a workload whose latency is dominated by writes, CPU, network or random accesses that never repeat. Compare representative repeated-read workloads with and without L2ARC, after allowing the cache to populate. Observe end-to-end latency, pool reads, ARC/L2ARC counters, RAM use and SSD writes. A benchmark that starts cold and ends before cache population says little about the steady-state case. The same distinction between addressable file size and resident fast memory matters for memory-mapped local LLM weights.

SLOG: synchronous-write intent logging

ZFS’s ZIL records information needed to make synchronous writes durable according to the requested semantics. Normally, the intent log resides on the pool. A Separate LOG device (SLOG) is a place for that log; it is not a general-purpose write-back cache for every write. Its intended benefit is reducing acknowledgement latency for synchronous writes by using a low-latency log device. Asynchronous writes generally do not become faster simply because an SLOG exists.

Applications such as databases, virtual machines or NFS clients can issue synchronous writes, but first confirm that the workload actually does so and that log latency constrains it. Benchmark realistic durable writes and inspect pool and application behavior. A SLOG device that does not lower the relevant latency adds cost and another component to manage. It should have suitable endurance and predictable latency under sustained writes. Because acknowledged synchronous writes depend on durable logging, power-loss protection and correct device behavior matter; a consumer SSD’s advertised speed alone is not a durability argument. Redundancy and failure consequences need consideration as part of the pool design, not as a checkbox.

Choose from evidence, not labels

These mechanisms solve distinct bottlenecks: ARC for memory-resident reads, L2ARC for selected additional reads, SLOG for synchronous-write logging latency. Start with a reproducible workload and baseline: identify read/write mix, sync semantics, access locality, latency distribution, throughput, RAM pressure and device queueing. Change one factor at a time and preserve the same data, concurrency and durability settings. A faster result obtained by disabling sync or changing durability guarantees is not an equivalent comparison.

OpenZFS’s documentation on caching and auxiliary devices distinguishes ARC, L2ARC and log devices; its workload-tuning guide discusses workload-specific behavior. Read the documentation for the OpenZFS release actually deployed: defaults and implementation details can evolve. A cache device is useful only when it addresses a measured bottleneck without compromising the durability, capacity or operating budget the system needs.

What to look for in a real pool

Pool topology influences what a cache can accomplish. If the underlying vdevs already serve the working set at the required latency, flash may have little effect. A metadata-heavy workload behaves differently from a large-file media library even at similar capacity. Establish a baseline with representative file sizes, concurrency and cache state; note whether operations are synchronous and whether clients wait for durable completion. Compare tail latency, not only peak throughput. For a NAS, collect client-observed latency too: server-side device numbers cannot show time spent in the network, protocol layer or application.

Account for lifecycle and failure modes. L2ARC is not a substitute for a redundant pool, backup or adequate RAM. An SSD used as SLOG should have sustained low-latency writes and power-fail behavior, not merely high sequential benchmark bandwidth. Verify the specific model’s documented power-loss protection: the relevant question is whether acknowledged writes survive sudden power loss. Keep configuration and replacement procedures documented, and evaluate what happens if the auxiliary device disappears. A speedup with an untested recovery path is not necessarily an improvement.

References

OpenZFS: Caching and Auxiliary Devices
OpenZFS: Workload Tuning