From owner-svn-src-head@freebsd.org Wed Aug 17 15:05:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76A16BBDBCC; Wed, 17 Aug 2016 15:05:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5680F1CF1; Wed, 17 Aug 2016 15:05:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net ([128.54.117.176]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u7HF5Xwu007627 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 17 Aug 2016 08:05:33 -0700 Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit To: Slawa Olhovchenkov References: <201608150930.u7F9UL1V069576@repo.freebsd.org> <861t1n6749.fsf@desk.des.no> <581c856c-826b-529e-c9c6-a397fb679708@freebsd.org> <20160817144944.GM22212@zxy.spb.ru> Cc: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Nathan Whitehorn Message-ID: Date: Wed, 17 Aug 2016 08:05:33 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160817144944.GM22212@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVY0KSf7VD9Zfubr+ZpkYcRaUXT1pxoj4TvCRRVM0SS5bJMk3PnnZ9rL0VzhOWk3egwnO0UiwR5A/GEgjOh8h0h1ypsui/GRNZY= X-Sonic-ID: C;cCx/C4xk5hGvKq/hcgQksw== M;Ug+1C4xk5hGvKq/hcgQksw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2016 15:05:43 -0000 On 08/17/16 07:49, Slawa Olhovchenkov wrote: > On Wed, Aug 17, 2016 at 07:36:00AM -0700, Nathan Whitehorn wrote: > >>> Your contention that the installer does not make policy decisions is >>> equally spurious. The installer makes many policy decisions, including >>> the disk layout, the size of the swap partition, the name of the pool, >>> the use of boot environments (which I dislike but am not allowed to >>> override), the number of filesets and their mountpoints (which I also >>> dislike and am not allowed to override either), etc. The Unix >>> philosophy is to push such decisions up the stack, not down. The >>> decision to align partitions on 4096-byte boundaries because we're not >>> sure of the correct number but know for a fact that using a smaller >>> number can have a huge impact on performance is the installer's to make. >> Those are all things that the operating system does not have defaults >> for: there are no tools like, say, gpart or newfs that layout disks in >> any even vaguely automated way, and so no tools that would ever have >> defaults for, say, the size of a swap partition except for the >> installer. As such, the defaults are quite properly in the installer. >> This is quite different: there are many tools that care about disk >> alignment (say, gpart) and, by default, use the GEOM stripesize. The >> installer is, after this patch, overriding what was meant to be a >> system-wide default. >> >> My concern is that pushing this into the installer means that newfs, >> zfs, gpart, etc., which all look at the GEOM stripesize for preferred >> alignment, will still have suboptimal behavior on systems affected by >> your patch. If we identified which drivers are reporting the wrong >> alignment, we could fix the whole system at a go by changing it there. >> As it is, we now have inconsistent default behavior for partitions >> between tools (the installer and sade will now use a different alignment >> than gpart on whatever systems you were trying to fix here) and between >> pre- and post-installation environments. > In long term, prefered aligment is forsing 4k (or may be more): > install system on 512b [mirror] disk aligment now may be need required replace > disk to 4k aligment. For more flexsible in future now best chois is 4k > or more. For future-proofing in such circumstances, it might be worth expanding the vfs.zfs.min_auto_ashift tunable into some global thing that the disk drivers (or geom_disk) read to round up the physical sector sizes they would otherwise report. That would ensure that gpart, zfs, etc. all behave consistently in such cases. -Nathan