From owner-freebsd-fs@FreeBSD.ORG Wed Apr 4 05:18:37 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C97106567B; Wed, 4 Apr 2012 05:18:37 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC528FC16; Wed, 4 Apr 2012 05:18:37 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q345IY6l001342 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Apr 2012 22:18:35 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F7BD9D1.80504@freebsd.org> Date: Tue, 03 Apr 2012 22:19:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Bob Friesenhahn References: <4F7BA173.6050903@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Current , fs@freebsd.org Subject: Re: "trim/discard" success story X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 05:18:37 -0000 On 4/3/12 6:50 PM, Bob Friesenhahn wrote: > On Tue, 3 Apr 2012, Julian Elischer wrote: >> >> for flash drives this is great news.. >> Now if ZFS would get trim support, that too would be great. > > The major unknown issue with trim is how well the drives > schedules/defers the trim operation so that it does not interfer > with other I/Os. Also, it would be really bad if the drive applied > trim after the block had been re-allocated for a write. It would > also be really bad if the drive loses unrelated data if there is a > power fail during trim. > > If writes get blocked by a pending trim, then trim would not help > very much. well since I work for the "drive manufacturer" I can say that in this case it really is worth it. :-) But I'm glad that it is getting out there that trim aint as easy as it seems. The hard part about trim is making it so that if you get a power failure, the trimmed data says trimmed. In some cases, it is not important. For example when a filesystem is used, trimmed data will never be accessed again without first writing new data to that address. but for any application that assumes that trimmed data will return zero's it is a critical feature. > > Bob