From owner-freebsd-questions@FreeBSD.ORG Tue Aug 26 06:51:49 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDD08E0F for ; Tue, 26 Aug 2014 06:51:48 +0000 (UTC) Received: from sdf.lonestar.org (mx.sdf.org [192.94.73.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.sdf.org", Issuer "SDF.ORG" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C9AD43F20 for ; Tue, 26 Aug 2014 06:51:48 +0000 (UTC) Received: from sdf.org (IDENT:bennett@sdf.lonestar.org [192.94.73.15]) by sdf.lonestar.org (8.14.8/8.14.5) with ESMTP id s7Q6pinw002549 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Tue, 26 Aug 2014 06:51:44 GMT Received: (from bennett@localhost) by sdf.org (8.14.8/8.12.8/Submit) id s7Q6pijc023521; Tue, 26 Aug 2014 01:51:44 -0500 (CDT) From: Scott Bennett Message-Id: <201408260651.s7Q6pijc023521@sdf.org> Date: Tue, 26 Aug 2014 01:51:44 -0500 To: paul@kraus-haus.org Subject: Re: some ZFS questions References: <201408070816.s778G9ug015988@sdf.org> <27DAA821-0303-4D51-ADA7-7780DB8FE85D@kraus-haus.org> <201408210837.s7L8bm01019230@sdf.org> <9207FB2C-5EDE-49A7-9B0E-7C9839250A7E@kraus-haus.org> <201408241001.s7OA19dZ004925@sdf.org> <5C83C4FD-571B-4557-8AD7-5578276D2ED5@kraus-haus.org> In-Reply-To: <5C83C4FD-571B-4557-8AD7-5578276D2ED5@kraus-haus.org> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2014 06:51:49 -0000 Paul Kraus wrote: > On Aug 24, 2014, at 6:01, Scott Bennett wrote: > > > Paul Kraus 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. > > Hmm...how 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 sdf.org *xor* bennett at freeshell.org * *--------------------------------------------------------------------* * "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 * **********************************************************************