ZFS separate log
A ZFS separate log is dedicated pool log-device storage used for intent-log blocks instead of their default allocation in the main pool.
A SLOG is optional, not the ZIL itself and not a general write cache or independent backup. Log devices may be mirrored, but RAID-Z log vdevs are not supported. [1] logbias=throughput bypasses configured log devices while retaining synchronous semantics; sync=disabled instead ignores application synchronous requests. [2] Data protected by an indirect log record need not be copied into the SLOG. [3] Under the 2.3 module defaults, blocks over zfs_immediate_write_sz, 32 KiB by default, are treated as logbias=throughput, and zil_slog_bulk caps synchronous-priority SLOG writes per commit at 64 MiB. [4]
Relations
- related
- ZFS Intent Log, ZFS transaction group, Write-back cache, Power loss protection, fsync, ZFS, ZFS virtual device (vdev)
Advantages
- A dedicated low-latency device such as NVRAM can raise synchronous write performance, and writes are load-balanced across several log devices. [1]
Limitations
- Spares cannot replace log devices. [1]
- Setting zil_nocacheflush can corrupt the ZIL on power loss when a volatile out-of-order write cache is enabled. [4]
Citations
- OpenZFS 2.3: zpoolconcepts(7), Intent Log and Cache Devices
- OpenZFS 2.3: zfsprops(7), sync and logbias
- OpenZFS 2.3.4: zfs_log.c, zfs_log_write selection of write state
- OpenZFS 2.3: zfs(4) module parameters, ZIL and SLOG tunables
Sources & caveats
- pool-man is OpenZFS 2.3 zpoolconcepts(7), re-read for log vdev types, load balancing, NVRAM devices and the spares rule. props-man is zfsprops(7) at 2.3, re-read for logbias and sync.
- params-man is OpenZFS 2.3 zfs(4), read for the 32 KiB zfs_immediate_write_sz and 64 MiB zil_slog_bulk defaults and the zil_nocacheflush warning.
- write-source, zfs_log.c at 2.3.4, was not re-read in this revision.
- The persistence-ordering entry links here because a SLOG moves where synchronous writes become durable ahead of the transaction group commit.