From owner-freebsd-questions@FreeBSD.ORG Mon May 13 13:38:04 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BFA02F1D for ; Mon, 13 May 2013 13:38:04 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-ve0-x22a.google.com (mail-ve0-x22a.google.com [IPv6:2607:f8b0:400c:c01::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 80032344 for ; Mon, 13 May 2013 13:38:04 +0000 (UTC) Received: by mail-ve0-f170.google.com with SMTP id 14so1764588vea.29 for ; Mon, 13 May 2013 06:38:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:mime-version:content-type:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=fraUBdJHGprR0SIz026aV6gX1sxLt5mE/dRm08QHvPw=; b=R1PQ3JkT2kUn4rr6K5EDjUNtnMx6o1BYa8CdRiRs4o9G5ZK8kGjmgd9aQeAHbu8EC0 6MSzHevF0eNaZG2N+GCGqUIko/YnY4Y1jh5NuUZ0lwlQR/LnrlLHeJw+gdzFlVHhg+f0 AdeWkHamaqElHx1jP7mqDp/dB31asA7/fhTZZDm78NCbG42gUf3eGL/bE24Wqq/eznTj Zbemj5ndR6xrhuxZ0qGaO96FbygkSVwqcYl3kyVdNlQu195RlbOhNyZ9s+gg8vGbn2gA wUsP3vum/QV//qOGYPIrfoaaQFxXJdf6cMDhwS4zXWh/h6OIdCWQRfSfMpqlPRFzCioF B3BQ== X-Received: by 10.52.155.141 with SMTP id vw13mr15269138vdb.43.1368452284000; Mon, 13 May 2013 06:38:04 -0700 (PDT) Received: from [192.168.2.66] ([96.236.21.119]) by mx.google.com with ESMTPSA id lb10sm12958692veb.5.2013.05.13.06.38.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 06:38:03 -0700 (PDT) Subject: Re: ZFS mirror install /mnt is empty Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=iso-8859-1 From: Paul Kraus In-Reply-To: Date: Mon, 13 May 2013 09:38:02 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <8C7A7E3A-355A-405F-840E-A60B4B6CBB1C@kraus-haus.org> References: <5190058D.2030705@micite.net> <472E17AF-B249-4FD3-8F5E-716F8B7867F5@kraus-haus.org> To: =?iso-8859-1?Q?Trond_Endrest=F8l?= X-Mailer: Apple Mail (2.1503) X-Gm-Message-State: ALoCoQlcUPYOxXwSVCSd0DNkAj6rgUfRwZEcezGYlS8MEaQMvM2pjeaHrTE4xzqIXEQy9UlLPanD Cc: "freebsd-questions@freebsd.org List" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 13:38:04 -0000 On May 13, 2013, at 9:25 AM, Trond Endrest=F8l = wrote: >=20 > I guess it's due to my (mis)understanding that files shorter than 4KB=20= > stored on 4K drives never will be subject to compression. And as you=20= > state below, the degree of compression depends largely on the data at=20= > hand. Not a misunderstanding at all. With a 4K minimum block size = (which is what a 4K sector size implies), a file less than 4KB will not = compress at all. While ZFS does have a variable block size (512B to = 128KB), with a 4K minimum black size (just like with any fixed block FS = with a 4KB block size), small files take up more pace than they should = (a 1KB file takes up an entire 4KB block). This ends up being an = artifact of the block size and not ZFS, any FS on a 4K sector drive will = have similar behavior. I leave compression off on most of my datasets, only turning it = on on ones where I see a real benefit. /var compresses vert well (I turn = off compression in /etc/newsyslog.conf and let ZFS compress even the = current logs :-), I find that some VM's compress very well, media files = do NOT compress very well (they tend to already be compressed), generic = data compresses well, as do scanned documents (uncompressed PDFs). Your = individual results will vary :-) Also remember, if you start with compression on and after a = while you are not seeing good compression ratios, go ahead and turn it = off. The already written data will remain compressed but new writes will = not be. -- Paul Kraus Deputy Technical Director, LoneStarCon 3 Sound Coordinator, Schenectady Light Opera Company