Pcornel
Storage · ZFS

SLOG

Cheat sheet · https://pcornel.dk/topic.php?topic=4023

Back to the Topic

Answer

A SLOG does not create the ZIL; it relocates intent-log records from the main pool to a separate log vdev. Its main value is low-latency stable acknowledgement for sync-heavy workloads. It should be selected for latency and trustworthy power-loss persistence, and may be mirrored where the risk model requires it. Asynchronous writes do not gain from SLOG because they do not use the ZIL durability path in the same way.

Remember

  • SLOG ≠ write cache.
  • SLOG ≠ L2ARC/cache vdev.
  • No synchronous workload ≈ little or no SLOG benefit.
  • Fast benchmark latency ≠ power-loss-safe persistence.

First checks

  • zpool status — logs vdev
  • zpool add <pool> log mirror nvme0n1 nvme1n1 — add mirrored SLOG
  • zpool iostat -v 1 — SLOG usage

Verify in this order

sync write → SLOG → ack

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 → SLOG ZFS map

ZFS boundaryWhat to verifyProof limit
Identity / topologyPool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective propertiesObject presence alone does not prove integrity, performance or recovery
Capacity / protectionPool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver stateFree space or ONLINE state at one layer does not prove end-to-end health
Failure boundaryA low-latency SLOG acknowledgement proves the log device accepted the synchronous intent under the tested durability contract; it does not make asynchronous writes faster or prove application consistency.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: workload issues synchronous writes, log vdev is stable and power-loss-safe, sync latency improves, and crash/recovery tests preserve the expected committed state.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=4023

Confirmation

Confirm action

Continue?