From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 2 08:20:20 2013 Return-Path: Delivered-To: freebsd-hackers@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 83DAB8FD for ; Sat, 2 Feb 2013 08:20:20 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1EACC3DF for ; Sat, 2 Feb 2013 08:20:19 +0000 (UTC) Received: by mail-ee0-f41.google.com with SMTP id c13so2379646eek.14 for ; Sat, 02 Feb 2013 00:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:date:from:to:subject:message-id:in-reply-to:references :reply-to:x-mailer:mime-version:content-type :content-transfer-encoding; bh=QFLstRuzNqmImPVPWlS49GEE5gFMa32uq8Bs48Jy6sM=; b=w365+jUJlKlv/k/PGgVZUBBVAbTwL2axPXKEI92DPQE1TU37AbhYz4LDBvknnnBzOS Lawrqu6fzLMQLF5XPNbKao5nYRgH4e4SOk1aVO3H6f2Syr5xYOs8t1Uz1aBn9QaJWexb ByJRu4Pw1DCtTPB3u7Nbd65fA5AoYXZ7YiJmWKwpucI/mWurngYYKHCCnHsV4skDnAka cST8aT/vejkrxaeO5Xbuyy6c4Z0paiftYHxjr7q6cMMIuMvjEGD6gY74zurSyHasJf0v KjAjcVvyMPvCR0k+6xQDPD5udgupFMtmrGH3+c6lEu7Lmzt6L+OXmhRHEO1WkRdnivyF Z89Q== X-Received: by 10.14.176.133 with SMTP id b5mr33919919eem.37.1359793218927; Sat, 02 Feb 2013 00:20:18 -0800 (PST) Received: from ernst.jennejohn.org (p578E2091.dip.t-dialin.net. [87.142.32.145]) by mx.google.com with ESMTPS id 3sm16417158eej.6.2013.02.02.00.20.17 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 02 Feb 2013 00:20:18 -0800 (PST) Date: Sat, 2 Feb 2013 09:20:16 +0100 From: Gary Jennejohn To: freebsd-hackers@freebsd.org Subject: Re: HDD write cache Message-ID: <20130202092016.6352519f@ernst.jennejohn.org> In-Reply-To: References: <72C01AB30B93443C8C6F1183A04BBE30@multiplay.co.uk> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Feb 2013 08:20:20 -0000 On Sat, 2 Feb 2013 01:19:50 +0100 (CET) Wojciech Puchar wrote: > > Investigating a bit more a device reset will also trigger the > > change so after changing the value you can use camcontrol reset > > to trigger the change to apply using e.g. > > camcontrol reset 0:0:0 > > THIS actually work. > > And the results are disastrous. in spite of NCQ working and fully filled, > when unpacking source tree (as a test) onto UFS filesystem gstat shows at > most 100 IOPS, and average 700 with write cache disabled. > > this is on / partition that spans 1/10 of disk. Drive can actually manage > multiple writes in short distance well with write cache enabled. > I also noticed a drastic drop in throughput when I disabled the write cache, about a factor of 4 or 5. However, in my case every HDD supports NCQ (32 tags), but NCQ is not enabled on any HDD. Whether that's because the driver for my chipset (ATI IXP700 AHCI SATA controller) doesn't turn NCQ on or for another reason, I can't say. I looked at the man page for camcontrol but a mechanism to turn on NCQ in the HDDs didn't jump off the page. Does anyone know off-hand of a way to turn on NCQ in the HDDs, other than maybe modifying the driver? -- Gary Jennejohn