Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2013 14:31:49 -0700
From:      Cody Ritts <cr@caltel.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: Aligning MBR for ZFS boot help
Message-ID:  <513E4D45.1020804@caltel.com>
In-Reply-To: <513E35EC.4080309@platinum.linux.pl>
References:  <513C1629.50501@caltel.com> <513D0E90.5090105@platinum.linux.pl> <513E1DD2.7030609@caltel.com> <513E35EC.4080309@platinum.linux.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?513E4D45.1020804>