From owner-freebsd-questions@FreeBSD.ORG Fri Jun 1 01:24:23 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD2CC106564A for ; Fri, 1 Jun 2012 01:24:23 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 4F10F8FC08 for ; Fri, 1 Jun 2012 01:24:23 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q511OME1085425; Thu, 31 May 2012 19:24:22 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q511OM9A085422; Thu, 31 May 2012 19:24:22 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 31 May 2012 19:24:22 -0600 (MDT) From: Warren Block To: Victor Sudakov In-Reply-To: <20120531170035.GA29456@admin.sibptus.tomsk.ru> Message-ID: References: <20120531025206.GA11699@admin.sibptus.tomsk.ru> <20120531170035.GA29456@admin.sibptus.tomsk.ru> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Thu, 31 May 2012 19:24:22 -0600 (MDT) Cc: freebsd-questions@freebsd.org Subject: Re: 9.0 on SSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 01:24:23 -0000 On Fri, 1 Jun 2012, Victor Sudakov wrote: > Warren Block wrote: >>> >>> I have installed 9.0-RELEASE on a SSD drive with the following >>> tweaking so far: >>> >>> 1. tmpmfs="YES" (WRKDIRPREFIX etc will go there too). >>> >>> 2. mount -o noatime >>> >>> 3. tunefs -t enable >>> >>> I have not done any tricky partition alignment, do I really need to? Is >>> anything else advisable? >> >> If it's not aligned, there can be a pretty significant performance >> drop. Please show the output of 'gpart show' on that drive if it's GPT >> (gpart show ada0) or drive and slice if it's MBR/bsdlabel (gpart show >> ada0 && gpart show ada0s1). > > It was created by the "Auto" option of the new FreeBSD installer: > > [sudakov@vas ~] gpart show ada0 > => 34 117231341 ada0 GPT (55G) > 34 128 1 freebsd-boot (64k) > 162 111148928 2 freebsd-ufs (53G) > 111149090 5861376 3 freebsd-swap (2.8G) > 117010466 220909 - free - (107M) That is not aligned, either with 4K or 1M: (162*512)/4096 = 20.25 If the performance is good enough, leave it alone. Use # diskinfo -tv /dev/ada0p2 to get an optimistic version, or do some in-depth benchmarking with benchmarks/bonnie++. To get it aligned, back up and repartition: (Back up first!) # gpart destroy -F ada0 # gpart create -s gpt ada0 # gpart add -t freebsd-boot -s 512k ada0 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0 # gpart add -t freebsd-ufs -b 1m -s 53G ada0 # gpart add -t freebsd-swap ada0 That creates a 512k boot partition which allows for growth of the boot code. Then the UFS partition starts at 1M, an even multiple of both 4k and 1M for alignment, and a common semi-standard. Then swap fills out the drive; that could be reduced by giving a -s size if you want to leave that 107M at the end for something else. (gpart's -a option is not used. It isn't needed here, and overrides the -b option in earlier versions of gpart.)