Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 73FBA650EE5 for ; Wed, 25 Jun 2008 17:00:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 51885-07 for ; Wed, 25 Jun 2008 17:00:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id A1DBE650EA8 for ; Wed, 25 Jun 2008 17:00:05 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m5PJxxG5010332; Wed, 25 Jun 2008 16:00:00 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m5PJxxqi010328; Wed, 25 Jun 2008 15:59:59 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Wed, 25 Jun 2008 15:59:59 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: "Peter T. Breuer" cc: Matthew Wakeling , pgsql-performance@postgresql.org Subject: Re: Hardware vs Software RAID In-Reply-To: <200806251605.m5PG5Il07546@inv.it.uc3m.es> Message-ID: References: <200806251605.m5PG5Il07546@inv.it.uc3m.es> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/151 X-Sequence-Number: 30501 On Wed, 25 Jun 2008, Peter T. Breuer wrote: > I refrained from saying in my reply that I would set up a firewire-based > link to ram in a spare old portable (which comes with a battery) if I > wanted to do this cheaply. Maybe, but this is kind of a weird setup. Not many people are going to run a production database that way and us wandering into the details too much risks confusing everybody else. > The log is sync. Therefore it doesn't matter what the guarantees are, or > at least I assume you are worrying about acks coming back before the > write has been sent, etc. Only an actual net write will be acked by the > firewire transport as far as I know. That's exactly the issue; it's critical for database use that a disk not lie to you about writes being done if they're actually sitting in a cache somewhere. (S)ATA disks do that, so you have to turn that off for them to be safe to use. Since the firewire enclosure is a black box, it's difficult to know exactly what it's doing here, and history here says that every type (S)ATA disk does the wrong in the default case. I expect that for any Firewire/USB device, if I write to the disk, then issue a fsync, it will return success from that once the data has been written to the disk's cache--which is crippling behavior from the database's perspective one day when you get a crash. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD