zfs-intent-log · shipping · also ZIL

ZFS Intent Log

The ZFS Intent Log is a per-dataset recovery log that can persist filesystem operations before their transaction group reaches stable storage.

Related Observatory article: Read on hesela.com

Intent records stay in memory until their TXG commits or until a synchronous request such as fsync or O_DSYNC commits them to the on-disk ZIL. After a crash, persisted records replay when the dataset is first instantiated. Log blocks are allocated from the main pool by default, or preferably from a dedicated log device. [1] [2] A copied record carries the data, up to zil_maxcopied of 7.5 KiB by default, while an indirect record points to a block written outside the log. Writes larger than zfs_immediate_write_sz, 32 KiB by default, are handled as with logbias=throughput. [3] [4] Transaction-data byte counters do not measure physical SLOG writes. [3]

Relations

related
ZFS separate log, ZFS transaction group, fsync, Write-ahead log, Crash consistency, ZFS

Advantages

  • A synchronous request can complete once its records are on the log, without waiting for the next transaction group to sync. [1]

Limitations

  • zil_slog_bulk, 64 MiB by default, caps the synchronous-priority SLOG write size per commit, and larger commits continue at asynchronous priority. [4]
  • Disabling cache flushes with zil_nocacheflush can corrupt the log on power loss when a volatile out-of-order write cache is enabled. [4]

Citations

  1. OpenZFS 2.3.4: zil.c, log lifecycle, zil_commit and zil_replay (accessed 2026-10-23)
  2. OpenZFS 2.3: zpoolconcepts(7), Intent Log and Cache Devices (accessed 2026-10-23)
  3. OpenZFS 2.3.4: zil.h, indirect and copied log records; statistics units (accessed 2026-10-23)
  4. zfs(4) module parameters at tag zfs-2.3.4: ZIL tunables (accessed 2026-10-23)
Sources & caveats
  • zil-source and zil-header re-read 2026-10-23 at tag zfs-2.3.4 for the in-memory lifecycle, replay point and record types. pool-man re-read for log placement. zfs-params is the zfs(4) page at the same tag, read for zil_maxcopied, zfs_immediate_write_sz, zil_slog_bulk and zil_nocacheflush.
  • The database-checkpoint entry links here because intent records become discardable once their transaction group commits, as log records do after a checkpoint.

JSON: /data/terms/zfs-intent-log.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. ZFS Intent Log. Hesela. 2026-10-25. https://hesela.dev/terms/zfs-intent-log/