From owner-freebsd-fs@FreeBSD.ORG Sat Apr 30 10:51:05 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29EF21065670; Sat, 30 Apr 2011 10:51:05 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7928E8FC13; Sat, 30 Apr 2011 10:51:04 +0000 (UTC) Received: by bwz12 with SMTP id 12so5214985bwz.13 for ; Sat, 30 Apr 2011 03:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=OO6yqiUV6+VUaPpPbkQE3CvsuGDnnWLNAmaei7Y7pb8=; b=JaH6BgTRt3CMqpw6TOzEbfuClgXhsrn0t0VdamZ1GDLQeFtEt7Z0Nk3saFszirE6fV 7ofxwe4QCUcOGaOxmAWkP3cnEn2vpwiL+BSbsf1Ocs6gfFeWo+6yeHbQjv6RgNchCOIj py9WftrIIaO56Qyjxnzgqnz52tcv7SKBNaUdk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=bgg016E4TFvVdZihdf4MmWsko8mduL1kfgva2xcGIkbX5d+d3MvGLmvrE7TdTbDIKX 9E73A59Zj51DmTtrmnxEynTk68dtXX0CYd5DLd81/6FWGhea2KRzw8X1m4by8F/S62eT OJZwiBvWDiwGZJnzWflbuOt2m7QMFaYhJpIFs= Received: by 10.204.171.65 with SMTP id g1mr5485978bkz.45.1304160663297; Sat, 30 Apr 2011 03:51:03 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id w3sm2106453bkt.5.2011.04.30.03.51.01 (version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 03:51:02 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DBBE985.9000701@FreeBSD.org> Date: Sat, 30 Apr 2011 13:50:45 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Julian Elischer References: <20110430072831.GA65598@icarus.home.lan> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: TRIM clustering 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: Sat, 30 Apr 2011 10:51:05 -0000 Julian Elischer wrote: > On 4/30/11 12:28 AM, Jeremy Chadwick wrote: >> On Sat, Apr 30, 2011 at 09:54:02AM +0300, Alexander Motin wrote: >>> I've noticed that on file deletion from UFS with TRIM enabled, kernel >>> issues BIO_DELETE for each 16K (block size?) separately -- thousands per >>> second for single big file deletion. Fortunately ada driver will try to >>> aggregate them for the device, but won't some clustering code worth to >>> be there? >> I'd like to know who decided it would be best to submit the TRIM command >> automatically on every single block that is deemed free by UFS during >> inode removal. The performance hit, from what I've been reading, from >> doing this is quite severe. Many SSDs take hundreds of milliseconds to >> complete TRIM operations, which greatly impacts filesystem performance. >> I appreciate the efforts to get TRIM into FreeBSD for UFS, but the >> implementation -- if what Alexander says is accurate -- seems like a bad >> choice. > > well not all devices take it as a hit.. The suggestion of some sort of > clustering is a good one but it should be tunable. I believe any device should benefit from receiving single 128K request instead of 8*16k. Just because of command processing overhead. Am I wrong? -- Alexander Motin