From owner-freebsd-stable@FreeBSD.ORG Wed Jun 5 22:16:52 2013 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BD11B1AF for ; Wed, 5 Jun 2013 22:16:52 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2281754 for ; Wed, 5 Jun 2013 22:16:52 +0000 (UTC) Received: from mfilter17-d.gandi.net (mfilter17-d.gandi.net [217.70.178.145]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id CADFE172091; Thu, 6 Jun 2013 00:16:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter17-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter17-d.gandi.net (mfilter17-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 8Wwq-hg361xt; Thu, 6 Jun 2013 00:16:39 +0200 (CEST) X-Originating-IP: 67.180.84.87 Received: from jdc.koitsu.org (c-67-180-84-87.hsd1.ca.comcast.net [67.180.84.87]) (Authenticated sender: jdc@koitsu.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id CB796172089; Thu, 6 Jun 2013 00:16:38 +0200 (CEST) Received: by icarus.home.lan (Postfix, from userid 1000) id ECF0973A1C; Wed, 5 Jun 2013 15:16:36 -0700 (PDT) Date: Wed, 5 Jun 2013 15:16:36 -0700 From: Jeremy Chadwick To: Dmitry Morozovsky Subject: Re: TRIM support through ciss Message-ID: <20130605221636.GA21946@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@FreeBSD.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 05 Jun 2013 22:16:52 -0000 On Thu, Jun 06, 2013 at 02:00:36AM +0400, Dmitry Morozovsky wrote: > Dear colleagues, > > I have a DB server with ciss and a bunch of disks (8 SAS + 2 Intel SATA SSD). > > However, this setup does not seem to support TRIM on SSDs: > > kstat.zfs.misc.zio_trim.bytes: 0 > kstat.zfs.misc.zio_trim.success: 0 > kstat.zfs.misc.zio_trim.unsupported: 418 > kstat.zfs.misc.zio_trim.failed: 0 > > > Excerpt from dmesg about SSD: > > da9 at ciss0 bus 0 scbus0 target 9 lun 0 > da9: Fixed Direct Access SCSI-5 device > da9: Serial Number PACCR9SZ7KJS > da9: 135.168MB/s transfers > da9: Command Queueing enabled > da9: 114439MB (234371520 512 byte sectors: 255H 32S/T 28722C) > da9: quirks=0x1 > da9: Delete methods: > > the last line bothers me... > > Is there any tuning I missed? I'm sure Steve will respond, but in the meantime... I assume this is you running stable/9 with r251419 or newer (which just got committed a few hours ago)? I haven't looked at the code, but it is very, VERY important to remember that you are *always* at the whim of 1) the controller driver (ciss(4) in this case), and 2) the controller firmware, as to whether or not certain pass-through commands are supported (in this case, since you have a SAS controller, this would be accomplished via a SCSI command that your controller does not support. Oh, it looks like Steve just replied and said more or less what I did. :-) Bottom line as "we" (the royal we, I guess) have been saying for many years now: any controller which operates in a RAID fashion and does not support "true JBOD" (meaning the controller acts a generic controller with no concept of RAID), will almost always get in the way. Instead, stick with true non-RAID controllers -- and yes I am aware choices are limited. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Making life hard for others since 1977. PGP 4BD6C0CB |