Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BA3051337B94 for ; Wed, 2 Feb 2011 22:00:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 34606-05 for ; Thu, 3 Feb 2011 02:00:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 66C971337B92 for ; Wed, 2 Feb 2011 22:00:37 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 46CD714AA; Wed, 2 Feb 2011 21:00:37 -0500 (EST) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7I1AuaUUX51G; Wed, 2 Feb 2011 21:00:35 -0500 (EST) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id 39FA419; Wed, 2 Feb 2011 21:00:35 -0500 (EST) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 32375AF477; Thu, 3 Feb 2011 10:00:34 +0800 (WST) Message-ID: <4D4A0C41.9020203@postnewspapers.com.au> Date: Thu, 03 Feb 2011 10:00:33 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Dan Birken CC: pgsql-performance Subject: Re: Which RAID Controllers to pick/avoid? References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/55 X-Sequence-Number: 42193 On 03/02/11 07:15, Dan Birken wrote: > However, they can't guarantee that any particular RAID controller would > be in stock when they are building the machine, so basically I would > like to know if any of these cards are sufficiently better or worse than > the others that I should either a) wait for a particular card or b) > avoid a card. I don't know the Adaptec parts above (I avoid them these days) but AFAIK the LSI is at least OK. Whatever RAID controller you get, make sure you have a battery backup unit (BBU) installed so you can safely enable write-back caching. Without that, you might as well use software RAID - it'll generally be faster (and cheaper) than HW RAID w/o a BBU. I get great results with Linux software RAID 10 on my Pg server - but then, I'm not loading it particularly hard. (I continually wish the `md' driver could use a PCIe/SATA battery-backed DRAM cache, because it'd be capable of massively outperforming most HW raid implementation if only it could offer safe write-back caching using persistent cache.) > Also, I am planning on replicating this box to a standby machine with > streaming replication. Given this, is there any reason not to use the > write cache on the RAID controller assuming it has battery backup? My > though being even in a worst case scenario if the BBU fails and the > master DB gets corrupted, the standby (not using any write cache) would > still be ok sans a few seconds of data (assuming the replication was > keeping up, which would be monitored). That sounds about right. The standby would be fine, the master would be totaled. If you're doing write-back caching without a BBU and things go down, it's not going to be neatly time-warped back a few seconds. Your DB will be corrupted, possibly massively. One big advantage of write-back caching is that it lets the controller batch and re-order writes for higher disk throughput as well as lower latencies at the app level. The cost of that is that you lose the safety of ordered writes to WAL then heap; it's quite possible for physical media writes to hit the heap before the WAL, for newer writes to hit the WAL before older writes, etc etc. Because of the cache, the OS and Pg never see or care about the crazily inconsistent state of the actual disk media - unless the cache is lost, in which case you're screwed. Assume that a BBU failure will require restoration from a backup or from a standby server. If you can't afford that, you should operate in write-through cache mode, possibly using synchronous commit and/or commit delay options if you can afford a few seconds data loss on crash. -- System & Network Administrator POST Newspapers