From owner-freebsd-stable@FreeBSD.ORG Mon Oct 13 18:48:40 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2D36C8A for ; Mon, 13 Oct 2014 18:48:40 +0000 (UTC) Received: from mario.brtsvcs.net (mario.brtsvcs.net [IPv6:2607:fc50:0:a400::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78EEAE6F for ; Mon, 13 Oct 2014 18:48:40 +0000 (UTC) Received: from chombo.houseloki.net (unknown [IPv6:2601:7:400:640:21c:c0ff:fe7f:96ee]) by mario.brtsvcs.net (Postfix) with ESMTPSA id 937942C1621; Mon, 13 Oct 2014 11:48:32 -0700 (PDT) Received: from [IPv6:2601:7:2580:674:baca:3aff:fe83:bd29] (unknown [IPv6:2601:7:2580:674:baca:3aff:fe83:bd29]) by chombo.houseloki.net (Postfix) with ESMTPSA id 9143AEF4; Mon, 13 Oct 2014 11:48:30 -0700 (PDT) Message-ID: <543C1E7B.4090204@bluerosetech.com> Date: Mon, 13 Oct 2014 11:48:27 -0700 From: Darren Pilgrim Reply-To: freebsd-stable User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Steven Hartland Subject: Re: getting to 4K disk blocks in ZFS References: <540FF3C4.6010305@ish.com.au> <54100258.2000505@freebsd.org> <5410F0B4.9040808@ish.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable 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 18:48:40 -0000 On 9/10/2014 6:22 PM, Steven Hartland wrote: > From: "Aristedes Maniatis" >> Should the FreeBSD project change this minimum in the next release? >> There seems to be no downside and a huge amount of pain for people >> who stumble along with the defaults not knowing what a mess they are >> creating to solve later. > > The downside is wasted space which can be significant and hence when > I last suggested just this it was unfortunately rejected. I always found that justification rather weak. If the default is 512b and you use 4k disks, you kill performance, create a massive headache of a correction task, and prevent ZFS from doing its data integrity assurance. If the default is 4k and (for the limited time they're still common) you use true 512b disks, you can waste space. Sure, but how much space? I nerd-sniped myself, and calculated it against my own systems: On my own Maildir (literally everything except spam since 1999): Average size of files modulo 4096: 3137 Total files: 2651888 ashift=12 would add 512 B slack per file--about 2.5% of the set's 54 GB on-disk size. Maildirs are historically one of the worst cases for slack. The worst case of an extra 3584 B slack per file would be 17.6%. A 25% slack allowance is typically what I use for planning IMAP storage requirements, so we're not even out of bounds. On the Samba server at work, which holds roughly two decades of office documents and other "human" files: Average size of files modulo 4096: 1260 Total files: 351892 Here, ashift=12 would add 2.5 kB slack per file--about 0.26% of the set's 350 GB on-disk size. The worst case would be 0.36% slack. In other words, it likely doesn't matter except in specific cases where you're already worrying about effective disk usage.