ZFS compression types

ZFS compression as of OpenSolaris 2008.11 has a few types to choose from.

lzjb (default) | gzip | gzip-[1-9]

They are used via the zfs set compression=gzip poolname command.

The following test was quickly done out of personal interest – and is in no way scientific!

I have a AMD cpu with 3 cores (2.4Ghz). The data i copied to each of the shares consisted of video / documents / pictures and music. The first test i have done is based on compression only (i have not measured throughput)

Original Data Size : 412MB

lzjb : 312MB Compression ratio : 1.32

gzip : 293MB Compression ratio : 1.41

gzip9 : 292MB Compression ratio : 1.41

gzip is the winner on compression. With this small sample of data it is unclear if the extra CPU overhead on a gzip-9 zfs files system is worth it – from these results i would say it isn’t.

Again – gzip may be the winner on compression, but this does not reflect an improvement on throughput (untested).

Update: i’ve done a quick test on cpu load and throughput and i wouldnt recommend using gzip unless you are really limited on disk space – or have plenty of CPU to spare. lzjb is much faster (less load on cpu) and does a pretty good job for compression on the fly.

08/06/2011 Update

If you want to check the compression on a particular file you can use a combination of ls (true files size) and du (size after compression) like so…

actual size

ls -lh file*

Compressed size

du -hs file*


10 Replies to “ZFS compression types”

  1. Pingback: ZFS basics | Daz's Bits and Bobs

  2. Update skin, plastic wrinkles without jabs and procedures is available to everyone. Chemical elements remove components of old cells. Skin quickly is updated. A face without wrinkles and signs of acne. Impressive improvement of the external appearance of the skin. Rejuvenation, plastic, removal wrinkles are guaranteed.
    Apply chemical peeling invented by German workers in the 19th century. Since then, innocuousness procedures has grown several times. Result can purchase and household conditions. Epidermis becomes smooth and light, without wrinkles, redness.
    chemical peel before after

  3. I simply want to tell you that I am just new to blogging and site-building and seriously liked this web blog. More than likely I’m likely to bookmark your site . You amazingly have very good articles and reviews. Cheers for sharing with us your web site.

  4. Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Any way I’ll be subscribing to your augment and even I achievement you access consistently fast.

  5. I am only writing to let you know what a exceptional discovery my daughter obtained visiting yuor web blog. She figured out too many issues, with the inclusion of what it’s like to possess an excellent helping mindset to make others smoothly know precisely chosen complex subject matter. You really did more than visitors’ expected results. Many thanks for rendering the beneficial, healthy, revealing and cool thoughts on this topic to Sandra.

  6. Good ¡V I should definitely pronounce, impressed with your site. I had no trouble navigating through all the tabs and related info ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Excellent task..

  7. Hiya, I’m really glad I have found this information. Today bloggers publish just about gossips and net and this is actually frustrating. A good website with interesting content, this is what I need. Thank you for keeping this web-site, I’ll be visiting it. Do you do newsletters? Cant find it.