From owner-freebsd-fs@FreeBSD.ORG Sun Jun 21 11:45:18 2009 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 3DEDF106564A for ; Sun, 21 Jun 2009 11:45:18 +0000 (UTC) (envelope-from andrew@modulus.org) Received: from email.octopus.com.au (email.octopus.com.au [122.100.2.232]) by mx1.freebsd.org (Postfix) with ESMTP id EE8208FC18 for ; Sun, 21 Jun 2009 11:45:17 +0000 (UTC) (envelope-from andrew@modulus.org) Received: by email.octopus.com.au (Postfix, from userid 1002) id 1F345172B9; Sun, 21 Jun 2009 21:45:39 +1000 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on email.octopus.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=10.0 tests=ALL_TRUSTED autolearn=failed version=3.2.3 Received: from [10.20.30.102] (60.218.233.220.static.exetel.com.au [220.233.218.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: admin@email.octopus.com.au) by email.octopus.com.au (Postfix) with ESMTP id E59051723B; Sun, 21 Jun 2009 21:45:34 +1000 (EST) Message-ID: <4A3E1C72.6000406@modulus.org> Date: Sun, 21 Jun 2009 21:41:38 +1000 From: Andrew Snow User-Agent: Thunderbird 2.0.0.6 (X11/20070926) MIME-Version: 1.0 To: Dan Naumov , freebsd-fs@freebsd.org References: <20090620231130.GA88907@owl.midgard.homeip.net> <3c1674c90906201808t1854dd46n82213fbd0c1c254c@mail.gmail.com> <20090621092736.GA92656@owl.midgard.homeip.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: ufs2 / softupdates / ZFS / disk write cache 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: Sun, 21 Jun 2009 11:45:18 -0000 Dan Naumov wrote: > Actually, if it is possible for ZFS to issue "flush the cache NOW" > commands directly to disk every 5 seconds by default (value tunable) I > see 2 potential options/changes that would make the life of > "UFS2+softupdates on SATA disks" users a whole lot easier. I believe you might be barking up the wrong tree here. The issue with cache flushing is not that changes are written to disk - that happens anyway, eventually, even if you don't explicitly flush the cache. The big issue is that things get written to disk in the correct order so that the system can recover from an unexpected crash. Even if the cache gets flushed every 5 seconds, things on UFS could get still get corrupted between T=0 and 4.9s, if the system writes something and expects it to be written syncronously and it is isn't. The only truly safe bet here is to turn disable the ATA write cache tunable. Folks who need to maximize safety and can't afford the performance hit of no write cache need to do what they always have had to do in the past - buy a controller card with battery-backed cached. - Andrew