ZFS cpu requirements, with/out compression and/or dedup

Marcus Reid marcus at blazingdot.com
Mon Sep 21 17:10:03 UTC 2015


On Sat, Sep 19, 2015 at 09:04:48AM -0500, Bob Friesenhahn wrote:
> CPU usage is rarely a problem for zfs except for when compression is 
> involved.  Lz4 is supposed to be CPU-efficient on Intel CPUs.

This is misleading.  lz4 compression is so fast that in the common case
it _increases_ performance.  This seems unintuitive until you realize
that the time it takes to compress the data is much smaller than the
time it takes to write the data to the media, so when you write, say,
25% less data to disk, that translates to time saved.

In addition, lz4 has early-abort where it will detect that the data is
uncompressible, and just write it out when it is instead of compressing
it.  This makes it so that you only "pay for" compression when it
actually does something.

It works really well, and that's why it's enabled by default.

Marcus


More information about the freebsd-fs mailing list