From owner-freebsd-stable@FreeBSD.ORG Mon Apr 4 01:46:09 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C16F106566B for ; Mon, 4 Apr 2011 01:46:09 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [65.120.238.197]) by mx1.freebsd.org (Postfix) with ESMTP id 2E07E8FC14 for ; Mon, 4 Apr 2011 01:46:08 +0000 (UTC) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.4/8.14.1) with ESMTP id p341k8Rr030401 for ; Sun, 3 Apr 2011 18:46:08 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.4/8.13.4/Submit) id p341k8Lp030400; Sun, 3 Apr 2011 18:46:08 -0700 (PDT) Date: Sun, 3 Apr 2011 18:46:08 -0700 (PDT) From: Matthew Dillon Message-Id: <201104040146.p341k8Lp030400@apollo.backplane.com> To: freebsd-stable@freebsd.org References: <20110403232937.E14CA1CC0C@ptavv.es.net> Subject: Re: Constant rebooting after power loss X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 01:46:09 -0000 :> Do you know if that's changed at all with NCQ on modern SATA drives? :> I've seen people commenting that using tags recovers most, if not all, :> of the performance lost by disabling the write cache. :... I've never tried that combination. Theoretically the 32 tags SATA supports would just barely be enough for sequential write service loads but I really doubt it would be enough for mixed service loads and you would be blowing up your read performance to achieve even that due to the length of time the tags stay busy with writes. With some driver massaging, such as partitioning the tag space and dedicating a specific number of tags for writing, read performance could probably be maintained but write performance (with caches off) would definitely still suffer. It might not horrible, though. One advantage of turning off the drive's write cache is that it would be possible for the OS to control write interference vs read loads, which is impossible to do with caches turned on. That is, with caches turned on your writes are instantly acknowledged until the drive's own caches exceed their dirty limits and by that time the drive is juggling so much dirty data that we (the OS/driver) have no control over read vs write performance. This is why it is so blasted difficult to write I/O schedulers in OS's that actually work. With caches disabled the OS/driver would have a great deal more control over read vs write performance. I/O scheduling would become viable. But to really make it work well I think we would need 64-128 tags (or more) to be able to cover multiple writing zones. With only 32 tags the drive's zone cache will be defeated. It would be a very interesting test. I can't immediately dismiss tagged I/O with write caches disabled. -Matt