Advanced Format Drive ?

Ronald F. Guilmette rfg at tristatelogic.com
Tue Nov 13 22:07:53 UTC 2012


In message <20121113073030.87bc0608.freebsd at edvax.de>, 
Polytropon <freebsd at edvax.de> wrote:

>Note that 4k = 8 x 512 byte, and so 64 sectors would be a
>good alignment "grid", while 63 sectors is not. That implies
>that in case you use fdisk to create a slice holding your
>partitions, try to make it start at sector 64 (63 would
>have been the default).

OK.  I've only ever used the FreeBSD fdisk to just look at what the
current (DOS) partitioning is, so I guess I'll have to dig into the
man page and try to figure out how to actually use it to create a
DOS partition starting at "block" 64.

>After that, use bsdlabel to create the partitions inside
>the slice as you want. Make them multiples of 1M or 1G,

OK.  I think that I always was doing that anyway.  But I want to be sure
that I understand... If the size of the BSD partition is a multiple of,
say, !MB, then the _alignment_ of that partition will likewise (auto-
magically) be at least 1MB also?  Or do I need to set the alignment
separately, e.g. my manually running bsdlabel?  (Normally, I've just
been using what noadays is being called "guided" partitioning, you
know, with the friendly curses-based GUI.  So As with fdisk, I have
no real experience using bsdlabee from teh command line.  But I guess
it is time that i learned how.)

>that should be no big deal because disks are big and cheap
>today. :-)

Yes, exactly so.  I am not exactly going to sweat losing even, say,
one megabyte now that I am the proud owner of a shiny new one TERABYTE
drive.  (Thirty years ago, I could hardly have even ever imagined that
such might exist one day, let alone that I myself would own one, and
let alone that I might have been able to purchase one for less than
$100 USD.  Rather amazing really.)

>You can then easily use newfs with the -f parameter:
>
>	newfs -U -f 4096 <device>
>
>This will make sure the proper fragment size will be applied
>upon formatting the created partitions.

OK.  Thanks.  I am guessing that this is really the one and probably
_only_ thing that might really make any significant difference, performance-
wise, right?  I mean if the partition is improperly aligned, that really
only would affect reading and/or writing at the very beginning or at the
very end of the partition, right?  Whereas this -f parameter for newfs
is, I gather, the thing that really tells the kernel the size of the
physical chunks of data that it can/should read/write to the drive at
any one time, right?

And while we are on the subject... Has anybody ever down any analysis
(i.e. benchmarking) to find out if -f 4096 is even the best number for
a modern high(er) capacity drive?  I'm just sort-of wondering if 8192
or 16384 might be better.



More information about the freebsd-questions mailing list