some ZFS questions

Scott Bennett bennett at
Tue Aug 26 06:51:49 UTC 2014

Paul Kraus <paul at> wrote:

> On Aug 24, 2014, at 6:01, Scott Bennett <bennett at> wrote:
> > Paul Kraus <paul at> wrote:
> >> I tend to agree. I do not recall off the top of my head, but I *think* you can enable compression on a zvol, in which case you can get that added benefit on the encrypted data, if you have the CPU power to handle both the encryption and the compression at once without too big a performance penalty.
> > 
> >     That may be worth keeping in mind for the future, but my present
> > collection of both encrypted and unencrypted file systems that are
> > candidates to be moved into the care of ZFS are almost entirely compressed
> > already.  Turning on compression for these would just add unnecessary CPU
> > overhead.
> > would zvol compression work?  Would UFS2 data structures
> > still be meaningful?  Would geli(8) or other g* utilities be able to find
> > the last sector(s) in order to create/read their label metadata?
> OK, I just checked and my zvol *does* have a compression property, so you can enable compression for zvols.

     That's good to know in case I someday have other archival needs, but
in the current situation, wouldn't buy me much, if anything, for the CPU
costs, as noted above.
> In terms of how it would work, the same was a for a filesystem. Remember, ZFS compression happens to the blocks as they are written to the vdevs. In the case of a zvol, it looks like a raw device to the OS. The compression is transparent to the layer using the volume.

     Hmm.  I wonder whether zvols simulate actual devices enough to fool
gvinum(8) and its kernel module.  Likewise for gpart(8)'s GPT scheme.
> On systems where I am CPU limited, I test each set of data I have to see if compression gets me anything. My home systems are MicroProliant N36L or N54L and with only 2 cores I am CPU limited :-) The larger systems I design and manage for clients are usually dual quad-core XEON, so I usually have tons of excess CPU, so I am much more liberal with my use of compression. I have found that Virtual Machine disk images (.vmdk files) tend to compress at better than 2:1, often better than 3:1.

     At present, I'm stuck with a first-generation Core 2 Quad (Q6600 - 2.4
GHz), so encryption costs, checksums cost, compression costs, etc.

                                  Scott Bennett, Comm. ASMELG, CFIAG
* Internet:   bennett at   *xor*   bennett at  *
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *

More information about the freebsd-questions mailing list