ZFS stats output - used, compressed, deduped, etc.

Pawel Jakub Dawidek pjd at FreeBSD.org
Sat Sep 29 14:37:23 UTC 2012


On Thu, Sep 20, 2012 at 08:46:24AM -0700, Jason Usher wrote:
> Hi,
> 
> I have a ZFS filesystem with compression turned on.  Does the "used" property show me the actual data size, or the compressed data size ?  If it shows me the compressed size, where can I see the actual data size ?

To calculate uncompressed data size you multiple 'used' property by
'compressratio' property.

> I also wonder about checking status of dedupe - I created my pool without dedupe, and continue to NOT enable dedupe - from zpool history, we see:
> 
> zpool create -f -O atime=off -O setuid=off -O exec=off -m /mnt/pool pool raidz3 da0 da1 da2 da3 da4 da5 da6 da7 da8 da9 da10 da11
> 
> Later, I enabled dedup for just a single filesystem on this pool:
> 
> zfs set dedup=on pool/dataset
> 
> and now, I see in 'zpool list' a value for dedupratio:
> 
> pool  dedupratio     1.65x       -
> 
> 
> Why do I see a value here ?  Isn't dedupe still OFF for the pool as a whole ?  I do NOT want to enable dedupe for the entire pool.
> 
> Also, why do I not see any dedupe stats for the individual filesystem ?  I see compressratio, and I see dedup=on, but I don't see any dedupratio for the filesystem itself...
> 
> Did turning on dedupe for a single filesystem turn it on for the entire pool ?

Deduplication is pool-wide property that you enable for each individual
file system. The idea here is to share deduped data across separate file
systems. Note that only file systems that you enabled dedup for will
actually participate in dedup. File systems that have dedup=off won't go
through the dedup.

Dedup works while you write to file system. Block's checksum is being
calculated and search for in dedup table. If we find a match, reference
count is bumped and no additional data is written to the pool. This path
is skipped for file systems that don't have dedup enabled.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20120929/ca95e1a4/attachment.pgp


More information about the freebsd-fs mailing list