From owner-freebsd-stable@FreeBSD.ORG Wed May 30 00:24:53 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7D6C106566B for ; Wed, 30 May 2012 00:24:53 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from noop.in-addr.com (mail.in-addr.com [IPv6:2001:470:8:162::1]) by mx1.freebsd.org (Postfix) with ESMTP id 90B2D8FC08 for ; Wed, 30 May 2012 00:24:53 +0000 (UTC) Received: from gjp by noop.in-addr.com with local (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SZWhz-000FLg-7s; Tue, 29 May 2012 20:24:15 -0400 Date: Tue, 29 May 2012 20:24:15 -0400 From: Gary Palmer To: Kees Jan Koster Message-ID: <20120530002415.GC92444@in-addr.com> References: <20120529203913.GB92444@in-addr.com> <43F6FDD2-3D31-44D7-82C7-4466D609ECF2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43F6FDD2-3D31-44D7-82C7-4466D609ECF2@gmail.com> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on noop.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD 9.0 hangs on heavy I/O X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 00:24:53 -0000 On Tue, May 29, 2012 at 10:59:58PM +0200, Kees Jan Koster wrote: > Dear Gary, > > >> # camcontrol devlist > >> at scbus1 target 0 lun 0 (pass0,ada0) > >> at scbus2 target 0 lun 0 (pass1,ada1) > >> at scbus3 target 0 lun 0 (pass2,ada2) > >> at scbus4 target 0 lun 0 (pass3,ada3) > >> at scbus7 target 0 lun 0 (pass4,cd0) > >> at scbus8 target 0 lun 0 (pass5,cd1) > > > > Check the SSD for its internal block size and make sure your filesystem > > and partitions are aligned with the disk block size. Unless there > > is something wrong with your SATA controller I'd expect a lot more than > > 273 IOPS/sec and ~30MByte/sec from a SSD. > > > Thank you for suggesting this. However, I recently went through my file systems to fix disk alignment. I ended up aligning them to 1M blocks, which raised the throughput from 6M/s to about 60-80MB/s which is what I am seeing today. > > # gpart show > ... > => 34 250069613 ada3 GPT (119G) > 34 2014 - free - (1M) > 2048 250067599 1 freebsd-ufs (119G) > > Do you think I need to revisit alignment? I don't have the specific device you have, but looking at the test results from a random site for the same drive and firmware, they got 465 random IOPS for a 0.5KB block size and a lot more than 60-80MB/sec. I get 60-80MB/sec from a WD green drive in a pure write situation (admitedly using ZFS), so I'm a bit surprised you're seeing similar performance from your SSD, although now I look at it, the drive appears to be an older model. It could be that you're running into issues where the drive is working hard as all the flash blocks need to be erased before reuse. You may get some improvement if you tweak the filesystem block size to the SSD block size. TRIM may also help if the drive supports it. Regards, Gary