From owner-freebsd-fs@FreeBSD.ORG Mon Mar 11 21:31:50 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5EE81BBA for ; Mon, 11 Mar 2013 21:31:50 +0000 (UTC) (envelope-from cr@caltel.com) Received: from mail2.caltel.com (mail2.caltel.com [66.102.145.6]) by mx1.freebsd.org (Postfix) with ESMTP id 4319C320 for ; Mon, 11 Mar 2013 21:31:49 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EAP5LPlFCZpCq/2dsb2JhbABDxGaBdXSCKQEBBThAEQsYCRYPCQMCAQIBRRMIAQGIDwy/YI8VFoMqA4hyjWOBHoRJiw6DKhw X-IPAS-Result: Ap8EAP5LPlFCZpCq/2dsb2JhbABDxGaBdXSCKQEBBThAEQsYCRYPCQMCAQIBRRMIAQGIDwy/YI8VFoMqA4hyjWOBHoRJiw6DKhw X-IronPort-AV: E=Sophos;i="4.84,825,1355126400"; d="scan'208";a="853759" Received: from host-170.a66-102-144.caltel.com (HELO codys-mac.local) ([66.102.144.170]) by smtp.caltel.com with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 11 Mar 2013 14:31:50 -0700 Message-ID: <513E4D45.1020804@caltel.com> Date: Mon, 11 Mar 2013 14:31:49 -0700 From: Cody Ritts Organization: CalTel User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Re: Aligning MBR for ZFS boot help References: <513C1629.50501@caltel.com> <513D0E90.5090105@platinum.linux.pl> <513E1DD2.7030609@caltel.com> <513E35EC.4080309@platinum.linux.pl> In-Reply-To: <513E35EC.4080309@platinum.linux.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2013 21:31:50 -0000 On 3/11/13 12:52 PM, Adam Nowacki wrote: >>> I also don't think there is any merit in aligning to 1MiB. Most ZFS IOs >>> will be aligned to sector size (ashift). Unless ZFS pool is created with >>> higher ashift then the 63 sector offset is as good as any. >> >> Aligning to the Erase block: >> >> http://blog.nuclex-games.com/2009/12/aligning-an-ssd-on-linux/ >> Also I will be forcing ashift to 12 using the gnop trick. >> >> If you still feel that is not necessary, I would be interested in >> knowing why? > > The mapping between sectors and physical flash pages/blocks is not fixed > and will change on each write or internal garbage collect. > http://www.devwhy.com/blog/2009/8/4/from-write-down-to-the-flash-chips.html > seems to explain this nicely. Aligning to more than page size offers no > benefit since this is the biggest continuous chunk of data that remains > continuous all the way to physical flash. > > If your SSD has page size of 4KiB then align to that. This is sector 504 > on FreeBSD (due to the multiple of 63 issue). ZFS pool will have to be > created with ashift=12. hmmmm... I see the point you are making, and there is so much that I dont know about zfs, SSDs and ATA. There is a commenter on there who certainly seems to agree with you: https://github.com/zfsonlinux/zfs/pull/924 But the vast majority of pages that claim aligning the partition boundaries to multiples of the erase block is really important. (Not that more pages makes it correct) But if you are right, and aligning to the erase block is pointless because the SSD doesn't care, then it should not hurt if I do add an offset, other than I will loose a few MB of space. It is certainly a good point you make but I just don't have the time to learn everything I need to know to make an educated decision for myself. So if I can satisfy the majority with no detriment, I will just do that so I can get this thing into production. Thanks Cody