NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Partition alignment for optimal disk I/O



"J. Lewis Muir" <jlmuir%imca-cat.org@localhost> writes:

> On Sat, Aug 25, 2018 at 7:40 PM Greg Troxel <gdt%lexort.com@localhost> wrote:

>> So yes, if you use MBR, make the NetBSD partition start at a mulitple of
>> 64.  Then, within disklabel, make every partition start at a multiple of
>> 64.
>
> Thank you for your reply!  Sorry to reply to this so late, but I don't
> understand why everything should start at a multiple of 64 sectors
> instead of 8 sectors?  Shouldn't it be a multiple of 8 sectors because
> 8 sectors * 512 bytes/sector = 4096 bytes which aligns with the
> underlying actual disk's 4K-sized sectors?

You are not confused; multiple of 8 will work.  But a multiple of 64 is
necessarily a multiple of 8!

However, long ago, 1 sector alignment was good enough.  Now it's 8
sectors.  So I am recommending aligning to 64, so that even in the
future it will be ok, and because wasting that many sectors is of no
consequence.

That said, I can remember 2.5MB disks, and that's only 5000 sectors...


Home | Main Index | Thread Index | Old Index