From owner-freebsd-stable@FreeBSD.ORG Thu Sep 11 10:23:45 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FD98813; Thu, 11 Sep 2014 10:23:45 +0000 (UTC) Received: from mailout05.t-online.de (mailout05.t-online.de [194.25.134.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10F3FE4A; Thu, 11 Sep 2014 10:23:44 +0000 (UTC) Received: from fwd41.aul.t-online.de (fwd41.aul.t-online.de [172.20.27.139]) by mailout05.t-online.de (Postfix) with SMTP id 458342F3EE8; Thu, 11 Sep 2014 12:15:12 +0200 (CEST) Received: from [192.168.119.33] (Z2Y7HEZSQhTTO-cHNDhxYwOHGdpJcP7ySyv-wKzQihgWZ6EcXFMuZOsPZBFMn5XwAr@[84.154.101.219]) by fwd41.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XS1PB-02Mq7E0; Thu, 11 Sep 2014 12:15:09 +0200 Message-ID: <54117624.7020907@freebsd.org> Date: Thu, 11 Sep 2014 12:15:00 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Pete French , freebsd-stable@freebsd.org, ari@ish.com.au Subject: Re: getting to 4K disk blocks in ZFS References: <540FF3C4.6010305@ish.com.au> <54100258.2000505@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-ID: Z2Y7HEZSQhTTO-cHNDhxYwOHGdpJcP7ySyv-wKzQihgWZ6EcXFMuZOsPZBFMn5XwAr X-TOI-MSGID: 8e61d911-2878-458c-8f90-c4c2339b0d0b 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: Thu, 11 Sep 2014 10:23:45 -0000 Am 11.09.2014 um 11:06 schrieb Pete French: >> This may never hit you, but ZFS is built on the assumption, that it >> cannot happen at all, which is no longer true with 4KB drives that >> are used with ashift=9. > > Have just been reading this thread, and as people are suggesting > moving ashift from 9 to 12, doesnt using use 512B drives with > ahift=12 also violate this ? Or is it smart enough ot know that > the underlying sectors are separate ? There is no problem, if ashift covers more than 1 sector, except that you waste some space. If ashift=12 is used with 512 byte sectors, then all writes will be to 8 consecutive sectors. There is no read-modify-write as in the opposite case (ashift=9 with 4K sectors). But the amount of wasted space can be quite substantial. I have read reports of some 8% less usable space with ashift=12 compared to ashift=9, for an empty ZFS file system. And with lots of small files, this will become worse, once the file system is filled. With RAIDZ, the effective allocation unit is not the minimum size block (as determined by ashift), but that value multiplied by the number of data drives without parity (e.g. 2*512 / 2*4K for a 3 drive raidz1, 4*512 / 4*4K for a 5 drive raidz1). This leads to an effective smallest allocation unit of 16 KByte on a 5 drive raidz1 with ashift=12, vs. 2 KByte with ashift=9. Regards, STefan