Pcornel
Storage · ZFS

Deduplication

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

Back to the Topic

Answer

When deduplication is enabled, ZFS identifies identical block content by checksum and maintains references through the DDT rather than storing duplicate physical blocks repeatedly. The DDT can become large and performance-sensitive; its working set, metadata placement and memory/cache behavior must be planned before enabling dedup on large datasets.

Remember

  • Deduplication ≠ compression.
  • Deduplication ≠ backup.
  • High dedup ratio ≠ low DDT memory/metadata cost.
  • Turning dedup off affects future writes; it does not automatically expand existing shared blocks into duplicates.

First checks

  • zpool list — DEDUP ratio
  • zpool status -D <pool> — DDT histogram
  • zdb -S <pool> — simulate dedup savings

Verify in this order

write → hash → DDT lookup → store or reference

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 → Deduplication 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 dedup hit proves a matching block representation was reused; it does not prove backup independence, low metadata cost or that dedup is beneficial for the overall workload.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: dedup ratio justifies cost, DDT working set and latency fit available resources, DDT storage is properly protected, and workload remains within baseline.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=4027

Confirmation

Confirm action

Continue?