{
  "status": "shipping",
  "advantages": [
    {
      "text": "Batching many changes into one group lets a single uberblock write publish them together.",
      "citationIds": [
        "txg-source"
      ]
    }
  ],
  "limitations": [
    {
      "text": "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.",
      "citationIds": [
        "zfs-params"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-25",
  "slug": "zfs-transaction-group",
  "term": "ZFS transaction group",
  "aliases": [
    "TXG",
    "txg"
  ],
  "definition": "A ZFS transaction group is an ordered batch of changes whose synchronization advances the pool's consistent persistent state.",
  "note": "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. [txg-source] The zfs_txg_timeout parameter defaults to 5 seconds, described as the maximum TXG duration for flushing dirty data. [zfs-params] Once a TXG is durable, its in-memory intent records can be discarded without requiring a separate on-disk log write. [zil-source]",
  "related": [
    "zfs-intent-log",
    "zfs-separate-log",
    "copy-on-write",
    "crash-consistency",
    "database-checkpoint",
    "zfs"
  ],
  "citations": [
    {
      "id": "txg-source",
      "title": "OpenZFS 2.3.4: txg.c, transaction-group lifecycle and synchronization",
      "url": "https://github.com/openzfs/zfs/blob/zfs-2.3.4/module/zfs/txg.c",
      "accessed": "2026-10-23"
    },
    {
      "id": "zil-source",
      "title": "OpenZFS 2.3.4: zil.c, log lifecycle, zil_commit and zil_replay",
      "url": "https://github.com/openzfs/zfs/blob/zfs-2.3.4/module/zfs/zil.c",
      "accessed": "2026-10-14"
    },
    {
      "id": "zfs-params",
      "title": "zfs(4) module parameters at tag zfs-2.3.4: zfs_txg_timeout and zfs_dirty_data_sync_percent",
      "url": "https://github.com/openzfs/zfs/blob/zfs-2.3.4/man/man4/zfs.4",
      "accessed": "2026-10-23"
    }
  ],
  "provenance": [
    "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."
  ]
}
