I have read a lot of information about planning RAM requirements forZFS deduplication. I've just upgraded my file server's RAM to support some very limited dedupe on ZFS zvols which I cannot use snapshots and clones on (as they're zvols formatted as a different filesystem) yet will contain much duplicated data.
I want to make sure that the new RAM I added will support the limited deduplication I intend to be doing. In planning, my numbers look good but I want to be sure.
How can I tell the current size of the ZFS dedupe tables (DDTs) on my live system? I read this mailing list thread but I'm unclear on how they're getting to those numbers. (I can post the output of zdb tank
if necessary but I'm looking for a generic answer which can help others)
Best Answer
You can use the
zpool status -D poolname
command.The output would look similar to:
The important fields are the Total allocated blocks and the Total referenced blocks. In the example above, I have a low deduplication ratio. 40.2G is stored on disk in 37.5G of space. Or 2.51 million blocks in 2.35 million block's worth of space.
To get the actual size of the table, see:
DDT entries 2459286, size 481 on disk, 392 in core
2459286*392=964040112 bytes Divide by 1024 and 1024 to get: 919.3MB in RAM.