Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  7 Dec 2012 15:30:24 -0800 (PST)
From:      "Ronald F.Guilmette" <rfg@tristatelogic.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        rfg@tristatelogic.com
Subject:   misc/174269: basinstall/partedit - default alignment screws disk performance
Message-ID:  <20121207233024.C0D305081B@segfault.tristatelogic.com>
Resent-Message-ID: <201212072340.qB7Ne0D7066171@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174269
>Category:       misc
>Synopsis:       basinstall/partedit - default alignment screws disk performance
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 07 23:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 9.1-RC3  amd64
>Organization:
entr0py
>Environment:

FreeBSD 9.1-RC3 amd64

>Description:

During a fresh install of FreeBSD 9.x, the user is given three choices
for how to perform partitioning, i.e. "Guided", "Manual", and "Shell".  The
first two options invoke a curses-based GUI, while the last option, when used,
instructs the user to perform some mounts and to hand-construct an fstab,
but all these instructions are so vague and non-specific that the "Shell"
partitioning menthod is essentially useless for most ordinary non-clairvoiant
humans.  That leaves the only useful choices as "Guided" and "Manual".

Under either the "Guided" or "Manual" partitioning methods, the user is
*never* offered *any* option(s) which would allow him/her to specify or
constrain the alignment of any of the partitions being created.

The inevitable result, as can be seen below, is a set of partitions that
are improperly aligned in a way that will create serious (critical?)
performance problems when applied to modern "Advanced Format" (4KB block
size) hard drives.

=========================================================================
# gpart show ada0
=>        34  1953525101  ada0  GPT  (931G)
          34         128     1  freebsd-boot  (64k)
         162     2097024     2  freebsd-ufs  (1G)
     2097186     4194304     3  freebsd-swap  (2.0G)
     6291490     8388608     4  freebsd-ufs  (4.0G)
    14680098     2097152     5  freebsd-ufs  (1.0G)
    16777250    33554432     6  freebsd-ufs  (16G)
    50331682   100663296     7  freebsd-ufs  (48G)
   150994978  1801453568     8  freebsd-ufs  (859G)
  1952448546     1076589        - free -  (525M)

=========================================================================

(Note:  My assumption is that the first column above is showing partition
starting sector numbers, where the "sectors" in question are traditional
512 byte sectors.  If that is correct, then quite clearly the starting
sector number "162" is *not* properly aligned on a 4KB boundary.)

If I am correct that the current  customary, normal, and standard method
of installing FreeBSD 9.x is likely to result in users unwittingly creating
hard disk partitions that are badly misaligned with respect to modern
"Advanced Format" (4KB) drives... drives which are already and increasingly
in widespread use... then the implication is that most people installing
FreeBSD 9.x from now on will end up with entirely sub-optimal disk performance
due to no fault of their own and without them even ever being aware that this
has happened, or how, or why.

That would be a travesty.  I hope and pray that someone will fix this before
the 9.1-RELEASE is finalized.

(A trivial fix would be to simply insure that all partitions created by
bsdinstall/partedit are aligned to minimum 4KB boundaries, however it would
be much better to do that AND also allow the user to explicitly select/specify
minimum alignment for all partitions... an option which is currently not
even offered to the user by bsdinstall/partedit.  Note that there are some
compatability issues which may even require partitions to be aligned to
minimum 1 MiB boundaries.  Thus, the user really should be given the option
to explicitly specify alignment for all partitions created. during an install.)


>How-To-Repeat:

Install FreeBSD 9.1-RC3 on a fresh/blank/zeroed "Advanced Format" hard drive,
using the "Guided" or "Manual" partitioning methods.

Afterwards, run "gpart show <drive>" in order to see the starting sector
numbers for all partitions.  Note that some/many/most of them are
aligned in a way that will produce entirely sub-optimal performance
for/with the "Advanced Format" drive.

>Fix:

If the normative maintainer/developer of bsdinstall/partedit cannot or does
not immediately step forward to correct this serious design flaw, then I
will take it upon myself to develop a set of appropriate patches, but given
that I am not at all familiar with the internals of any of the relevant
code, my hope is that it won't come to that (because it would take me a
lot longer to come up with suitable patches than it would the current
developer/maintainer of bsdinstall/partedit.)
>Release-Note:
>Audit-Trail:
>Unformatted:



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