OpenSolaris Dedup details

So ZFS dedup made it into build 128, which is now available from the /dev repository and will therefore be in the 2010.03 release of OpenSolaris.

So how to setup and test, it’s very easy from a terminal window.  I’ve got compression set on the pools, so lets get some baseline numbers: (see Thierry’s PartnerTech blog for a very good write up/debug for the use of compression)

# zfs get compressratio
NAME                       PROPERTY       VALUE  SOURCE
rootpool                   compressratio  1.37x  -
rootpool/ROOT              compressratio  1.50x  -
rootpool/ROOT/os_next      compressratio  1.50x  -
rootpool/dump              compressratio  1.00x  -
rootpool/swap              compressratio  1.00x  -
tank                       compressratio  1.14x  -
tank/home                  compressratio  1.14x  -

So this is the base compression set on the 2 zfs pools currently. Let’s turn on dedup.  I’ve chosen to use the sha256 setting, with verify.  This will ask me to overwrite if there’s the small chance that 2 blocks have the same sha256.  Always good to be cautious 😉

# zfs set dedup=sha256,verify rootpool
# zfs set dedup=off rootpool/swap
# zfs set dedup=off rootpool/dump
# zfs get dedup
NAME                       PROPERTY  VALUE          SOURCE
rootpool                   dedup     sha256,verify  local
rootpool/ROOT              dedup     sha256,verify  inherited from rootpool
rootpool/ROOT/os_129       dedup     sha256,verify  inherited from rootpool
rootpool/dump              dedup     off            local
rootpool/swap              dedup     off            local
tank                       dedup     off            default
tank/home                  dedup     off            default

Now to reboot and copy some small test databases 😉

Advertisements
%d bloggers like this: