Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9EB909F9F49 for ; Mon, 11 Dec 2006 13:53:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 05421-02 for ; Mon, 11 Dec 2006 13:53:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id C5D6F9F9F46 for ; Mon, 11 Dec 2006 13:53:06 -0400 (AST) Received: (qmail 5896 invoked by uid 500); 11 Dec 2006 17:54:11 -0000 Date: Mon, 11 Dec 2006 11:54:11 -0600 From: Bruno Wolff III To: Mark Lewis Cc: Brian Wipf , pgsql-performance@postgresql.org Subject: Re: File Systems Compared Message-ID: <20061211175411.GA3236@wolff.to> Mail-Followup-To: Bruno Wolff III , Mark Lewis , Brian Wipf , pgsql-performance@postgresql.org References: <82bqmh3rfc.fsf@mid.bfk.de> <1165424114.9734.298.camel@archimedes> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1165424114.9734.298.camel@archimedes> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/249 X-Sequence-Number: 22305 On Wed, Dec 06, 2006 at 08:55:14 -0800, Mark Lewis wrote: > > Anyone run their RAIDs with disk caches enabled, or is this akin to > > having fsync off? > > Disk write caches are basically always akin to having fsync off. The > only time a write-cache is (more or less) safe to enable is when it is > backed by a battery or in some other way made non-volatile. > > So a RAID controller with a battery-backed write cache can enable its > own write cache, but can't safely enable the write-caches on the disk > drives it manages. This appears to be changing under Linux. Recent kernels have write barriers implemented using cache flush commands (which some drives ignore, so you need to be careful). In very recent kernels, software raid using raid 1 will also handle write barriers. To get this feature, you are supposed to mount ext3 file systems with the barrier=1 option. For other file systems, the parameter may need to be different.