zfs-transaction-group · shipping · also TXG, txg

ZFS transaction group

A ZFS transaction group is an ordered batch of changes whose synchronization advances the pool's consistent persistent state.

Related Observatory article: Read on hesela.com

The 2.3.4 implementation gives each group a 64-bit consecutive identifier and describes open, quiescing and syncing states, so up to three groups can be active at the same time. Syncing writes accumulated state and finishes by writing a new uberblock. A TXG identifier is not a timestamp or an application transaction ID, and the configured timeout does not guarantee a maximum crash-loss window. [1] The zfs_txg_timeout parameter defaults to 5 seconds, described as the maximum TXG duration for flushing dirty data. [3] Once a TXG is durable, its in-memory intent records can be discarded without requiring a separate on-disk log write. [2]

Relations

related
ZFS Intent Log, ZFS separate log, Copy-on-write (storage), Crash consistency, Database checkpoint, ZFS

Advantages

  • Batching many changes into one group lets a single uberblock write publish them together. [1]

Limitations

  • A sync can start before the timeout once dirty data reaches zfs_dirty_data_sync_percent, 20% of zfs_dirty_data_max by default, so the timeout is an upper bound on group duration, not a fixed schedule. [3]

Citations

  1. OpenZFS 2.3.4: txg.c, transaction-group lifecycle and synchronization (accessed 2026-10-23)
  2. OpenZFS 2.3.4: zil.c, log lifecycle, zil_commit and zil_replay (accessed 2026-10-14)
  3. zfs(4) module parameters at tag zfs-2.3.4: zfs_txg_timeout and zfs_dirty_data_sync_percent (accessed 2026-10-23)
Sources & caveats
  • txg-source is txg.c at tag zfs-2.3.4, re-read 2026-10-23 for the identifier width and the three active states. zfs-params is the zfs(4) manual page at the same tag, read for zfs_txg_timeout and zfs_dirty_data_sync_percent.
  • The rollback-journal entry links here because a rollback journal undoes a partial transaction, whereas a TXG commits by publishing a new uberblock.

JSON: /data/terms/zfs-transaction-group.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. ZFS transaction group. Hesela. 2026-10-25. https://hesela.dev/terms/zfs-transaction-group/