Date: Thu, 31 May 2012 19:24:22 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Victor Sudakov <vas@mpeks.tomsk.su> Cc: freebsd-questions@freebsd.org Subject: Re: 9.0 on SSD Message-ID: <alpine.BSF.2.00.1205311847570.85245@wonkity.com> In-Reply-To: <20120531170035.GA29456@admin.sibptus.tomsk.ru> References: <20120531025206.GA11699@admin.sibptus.tomsk.ru> <alpine.BSF.2.00.1205310652350.81499@wonkity.com> <20120531170035.GA29456@admin.sibptus.tomsk.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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.)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1205311847570.85245>