" Doing it wrong " and posting "results" doesn't mean much. Nobody in real life is going to try to impose a 256KB quota on dedup, this isn't the 1980s.
32GB RAM on the server. I gave my ~30TB 4TBx14-disk DRAID2 fast-dedup a quota of 16GB + special device mirror. Even with the pool ~70% full it hasn't gotten anywhere near that. IIRC it's only using somewhere under 3GB for dedup table.
Had One-off issue, permanent error in metadata that was probably from dual-booting different ZFS versions. Scrub wasn't fixing it at all. Created new "just big enough" temporary RAID0 pool, copied data over with rclone in parallel, recreated DRAID pool, copied data back. Metadata error gone.
Fair on the 256K — nobody would run that, and I didn't suggest anyone should. It was picked to make the table actually fill on a 1.25 GiB corpus. Worth separating the units while we're here, though: dedup_table_quota caps the
on-disk DDT size, not RAM — dedup_table_size is what it's measured against. RAM pressure comes later, through ARC caching the thing.
The finding wasn't "256K is too small", though. It was that the quota
wasn't enforced: the table reached 1.95M against a 256K cap, 7.6× over. It's a soft limit, so the overshoot scales with how fast you dirty data between transaction groups — at any quota value, 16 GB included. Whether you'd ever notice is a separate question.
Your pool is more interesting to me than my test box, because it would settle something this thread has left open.
@alexskysilk put the cost at ~2 GB per deduplicated TB in #20 — at ~21 TB of data that's ~42 GB of table. You're reporting under 3 GB for the same amount of data. That's an order of magnitude apart and one of them has to be wrong.
If you can post zpool status -D and the recordsize of the deduped datasets, that would be the first real fast-dedup sizing figure in this thread — mine came from a corpus small enough to be a toy, and daanw's is from the 0.8–2.0 era. A 1M recordsize would explain the whole gap on its own; if it's 128K, something more interesting is going on.
Unrelated, since it keeps not coming up: I also have the block cloning half measured on 2.4.3 and haven't posted it — BRT sharing does
not survive zfs send (the replica re-expands by exactly what was saved), and zfs list shows no change at all after a reflink pass, only zpool list does. That belongs in its own post rather than bolted onto this one.