In OpenSolaris and later updates of Solaris 10 the ability to clone a zone is available. A zone is installed on a ZFS filesystem of which a clone is created for every new zone. Only minor modifications are made to the cloned filesystem to give the zone it's unique identity. This works much like deduplication until you patch or upgrade the system, which will make all the clones contain their own copies of the new data even if it's common to other zone instances.
Sparse zones are not supported by the new packaging system in OpenSolaris and it might never be. But zones in OpenSolaris only installs a very basic set of packages, which makes a clean install of a zone very small to begin with, they can then be placed on a compressed filesystem, and in OpenSolaris 2010.03 this filesystem can also be deduplicated.
I've done a small test to see how much space will be used by every zone instance with both compression and deduplication. These are freshly installed zones with have been booted once so that everything have been initialized in the zones:
A single zone on a LZJB compressed and deduped ZFS filsystem:
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOTTwo zones:
zdup01 9.94G 241M 9.70G 2% 1.01x ONLINE -
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOTThree zones:
zdup01 9.94G 253M 9.69G 2% 1.99x ONLINE -
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOTSo every zone uses a little more than 10MB of disk space and with deduplication you also get the same benefits in memory footprint as a with a sparse zone since there is only one deduplicated instance of Solaris libraries and binaries for the zones. They are however not shared with the global zone, since it boots from a separate pool without compression and deduplication. Unlike zones on a cloned ZFS filesystem the deduplication will continue to work after upgrading the zones and for software added to the zone from for example the pkg repositories post install time.
zdup01 9.94G 263M 9.68G 2% 2.96x ONLINE -
It looks like I can continue continue to run 20 zones on my thirteen year old Ultra 2 workhorse even if I upgrade it to OpenSolaris one day.
No comments:
Post a Comment