From owner-freebsd-stable@FreeBSD.ORG Mon Oct 13 23:51:29 2014 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F4F0D2A; Mon, 13 Oct 2014 23:51:29 +0000 (UTC) Received: from mail-in2.apple.com (mail-out2.apple.com [17.151.62.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 064355F2; Mon, 13 Oct 2014 23:51:28 +0000 (UTC) Received: from mail-out.apple.com (mail-out.apple.com [17.151.62.51]) (using TLS with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by mail-in2.apple.com (Apple Secure Mail Relay) with SMTP id 6F.D7.26497.A756C345; Mon, 13 Oct 2014 16:51:22 -0700 (PDT) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from relay4.apple.com ([17.128.113.87]) by local.mail-out.apple.com (Oracle Communications Messaging Server 7.0.5.30.0 64bit (built Oct 22 2013)) with ESMTP id <0NDE00CQ8Q9MI841@local.mail-out.apple.com>; Mon, 13 Oct 2014 16:51:22 -0700 (PDT) X-AuditID: 11973e11-f79f76d000006781-57-543c657a60d4 Received: from [17.149.228.210] (Unknown_Domain [17.149.228.210]) (using TLS with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by relay4.apple.com (Apple SCV relay) with SMTP id D7.A8.03493.3856C345; Mon, 13 Oct 2014 16:51:31 -0700 (PDT) Subject: Re: getting to 4K disk blocks in ZFS From: Charles Swiger In-reply-to: <201410132302.s9DN2F91030438@gw.catspoiler.org> Date: Mon, 13 Oct 2014 16:51:21 -0700 Message-id: <2272C292-3FAE-49CB-968A-E31A606EC77C@mac.com> References: <201410132302.s9DN2F91030438@gw.catspoiler.org> To: Don Lewis X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IC1RNPXySwgtoiAisTEnr8sELfJS3z4cJx9AiP/LCQXzUJy0SwkYxcwMq9i FChKzUmsNNFLLCjISdVLzs/dxAgKvIbC8B2M/5ZZHWIU4GBU4uEtiLQJEWJNLCuuzD3EKMHB rCTC+zYEKMSbklhZlVqUH19UmpNafIhRmoNFSZyXIRooJZCeWJKanZpakFoEk2Xi4JRqYGQ6 9cSp36hLrikvKP5A99tOzpPzMl4zxNz6YmS35hUbm/L3jaa9yXdCo9mi5uSZlm/Vfz1buONJ 6xWpfWkTuc7/vHyA9d7jCFfpdYan6niXOPwNZOeYs85/+Y9GWYZKUe+duSlGn1L+NunVSCkv MrUQzrm2vLGU74YHT7b93XX5xr02Vfc6lViKMxINtZiLihMBXbykRjgCAAA= Cc: freebsd-stable@FreeBSD.org, lyndon@orthanc.ca X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 23:51:29 -0000 On Oct 13, 2014, at 4:02 PM, Don Lewis wrote: > On 13 Oct, Charles Swiger wrote: >> Hi-- >> >> On Oct 13, 2014, at 2:25 PM, Lyndon Nerenberg >> wrote: >> [ ... ] >>> On any real-world system where you're running ZFS, it's unlikely the >>> 4K block overhead is really going to be an issue. And the underlying >>> disk hardware is moving to 4K physical sectors, anyway. Sooner or >>> later you're just going to have to suck it up. >> >> Or SSDs, which currently have anywhere from 2KB to 16KB "sectors". > > Which is even worse because you're more likely to care about wasted > space because of the much higher cost per byte. Yep. Mail spools see a surprising amount of disk activity, and while SSDs do wonderfully for the read side and seek times, lots of small writes isn't something they handle very well. >> I suspect that MIX -- http://en.wikipedia.org/wiki/MIX_%28Email%29 -- >> will gain in popularity. Big messages are kept one per file, just as >> Maildir does, but MIX also does a pretty good job of conserving inodes >> (or equivalent) and minimizing wasted space from intrinsic >> fragmentation due to filesystem blocksize by aggregating small >> messages together. > > Interesting, but it would be nice to have a more generic solution that > could be used to solve the equivalent problem with /usr/ports and > similar sorts of things. For instance, it looks like /usr/src expands > by quite a bit on an ashift=12 raidz1, though not quite as much as my > mail spool. For readonly data, it's easy enough to keep the tree in a tarball, iso, or similar and let libarchive / bsdtar / mount -t cd9660 deal with it. As soon as you start trying to update pieces of that content, though, it turns immediately back into the same hard problem. Any storage medium that imposes a minimum physical sector size is going to demand that the filesystem on top of it honor that or suffer expensive read-modify-write cycles when the logical sector size is smaller than the actual physical sector size. Regards, -- -Chuck