From owner-freebsd-fs@FreeBSD.ORG Wed Apr 4 01:18:07 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D27D21065686; Wed, 4 Apr 2012 01:18:07 +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 A3DC58FC15; Wed, 4 Apr 2012 01:18:07 +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 q341I5q0000619 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Apr 2012 18:18:06 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F7BA173.6050903@freebsd.org> Date: Tue, 03 Apr 2012 18:18:43 -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: fs@freebsd.org, FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: "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 01:18:07 -0000 Today I had reason to try the UFS "trim" support on the FreeBSD version of the Fusion-IO driver, and I'm pleased to say that it appears to work just fine.. on a 1.3TB flash card.. the numbers of 'sectors' that the drive considers to hold valid data is reduced after the contents of the drive is erased..: After newfs -E: hw.fusion.fio.fio0.data.stats: [...] 861327 [...] After writing a few GB to the filesystem but BEFORE"rm -r *" pu05# sysctl hw.fusion.fio.fio0.data.stats hw.fusion.fio.fio0.data.stats: [...] 3628354 [...] After"rm -r *" pu05# sysctl hw.fusion.fio.fio0.data.stats hw.fusion.fio.fio0.data.stats: [...] 919690 [...] so from 861,327 packets valid to 3,628,354 packets valid, back to 919,690 packets valid. (since bitmaps etc are allocated as needed the growth is expected but will not grow forever). (yeah I know it never actually reached 1% full but it was a test, ok?) for flash drives this is great news.. Now if ZFS would get trim support, that too would be great.