From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 7 23:40:00 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B84D286E for ; Fri, 7 Dec 2012 23:40:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9A68FC18 for ; Fri, 7 Dec 2012 23:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qB7Ne0Ya066172 for ; Fri, 7 Dec 2012 23:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qB7Ne0D7066171; Fri, 7 Dec 2012 23:40:00 GMT (envelope-from gnats) Resent-Date: Fri, 7 Dec 2012 23:40:00 GMT Resent-Message-Id: <201212072340.qB7Ne0D7066171@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Ronald F.Guilmette" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F02D3D9 for ; Fri, 7 Dec 2012 23:30:32 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id D7F208FC12 for ; Fri, 7 Dec 2012 23:30:31 +0000 (UTC) Received: by segfault.tristatelogic.com (Postfix, from userid 1237) id C0D305081B; Fri, 7 Dec 2012 15:30:24 -0800 (PST) Message-Id: <20121207233024.C0D305081B@segfault.tristatelogic.com> Date: Fri, 7 Dec 2012 15:30:24 -0800 (PST) From: "Ronald F.Guilmette" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: misc/174269: basinstall/partedit - default alignment screws disk performance Cc: rfg@tristatelogic.com X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: "Ronald F.Guilmette" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2012 23:40:00 -0000 >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 " 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: