[ZFS] Interaction between DDT R/W and ashift/block size?

Stilez stilezy at gmail.com
Tue Jun 11 06:12:53 UTC 2019

Can someone please clarify for me, how DDT block R/W is affected by the 
ashift setting and pool block sizes, as this is fairly deep ZFS stuff. Thanks

1) DDT entries are typically 180-280 bytes on disk. A look at gstat or 
other disk tools (iostat, dtrace) shows that DDT blocks are typically 4K on 
disk, on a usual system with ashift=12.

 - Does this mean that a typical on-disk 4K DDT block will usually contain 
~ 10-20 DDT entries? Or do on-disk DDT blocks only store 1 entry per block, 
regardless of block size, wasting most of their space?

2) Like other blocks, DDT are collated in TXGs before writing out, 
suggesting they might be written sequentially, in groups, or with multiple 
entries per block, making larger IO more efficient.

 - If I increase ashift from 12 to say 13 or 14, is this likely to enhance 
DDT storage efficiency and DDT record load/save time by cutting IO, or just 
waste space with no DDT IO benefit? (I appreciate this would impact small 
files in the pool). What about increasing prefetch for small IO?

Both pool and server are specced for and suitable for dedup, being ~ 4x 
dedup and having ~ 0.25 TB ARC + 0.5 TB of 900p L2ARC, with a metadata 
reservation in ARC ample for the entire 162M entries in DDT as well as all 
other metadata. I'm also assuming ashift size applies to DDT blocks in the 
first place.

Thanks for any insight available, as this is fairly deep stuff in the ZFS 


More information about the freebsd-fs mailing list