Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0315FB5DBE6 for ; Thu, 18 Aug 2011 21:52:38 -0300 (ADT) 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 25924-01 for ; Fri, 19 Aug 2011 00:52:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.catalyst.net.nz (bertrand.catalyst.net.nz [202.78.240.40]) by mail.postgresql.org (Postfix) with ESMTP id 639AAB5DBC4 for ; Thu, 18 Aug 2011 21:52:31 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id 41F0433016; Fri, 19 Aug 2011 12:52:28 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zEFrmJLDF0DU; Fri, 19 Aug 2011 12:52:27 +1200 (NZST) Received: from [IPv6:2404:130:0:1000:222:15ff:fe5c:2471] (unknown [IPv6:2404:130:0:1000:222:15ff:fe5c:2471]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 873D833014; Fri, 19 Aug 2011 12:52:27 +1200 (NZST) Message-ID: <4E4DB3C4.5020307@catalyst.net.nz> Date: Fri, 19 Aug 2011 12:52:20 +1200 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Ogden CC: pgsql-performance@postgresql.org Subject: Re: Raid 5 vs Raid 10 Benchmarks Using bonnie++ References: <959BD2FA-0312-458B-BD5F-ED358D2C47ED@darkstatic.com> <75A85649-2B95-43D5-8404-4776D2E580EC@darkstatic.com> <4E4C2FB4.4010409@2ndQuadrant.com> <207E881B-73CD-4C31-A863-2C238838C41F@darkstatic.com> <4E4CA4BC.9050908@ringerc.id.au> <4E4CBA47.5070600@catalyst.net.nz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.037 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.137 X-Spam-Level: X-Archive-Number: 201108/230 X-Sequence-Number: 44677 On 19/08/11 02:09, Ogden wrote: > On Aug 18, 2011, at 2:07 AM, Mark Kirkwood wrote: > >> On 18/08/11 17:35, Craig Ringer wrote: >>> On 18/08/2011 11:48 AM, Ogden wrote: >>>> Isn't this very dangerous? I have the Dell PERC H700 card - I see that it has 512Mb Cache. Is this the same thing and good enough to switch to nobarrier? Just worried if a sudden power shut down, then data can be lost on this option. >>>> >>>> >>> Yeah, I'm confused by that too. Shouldn't a write barrier flush data to persistent storage - in this case, the RAID card's battery backed cache? Why would it force a RAID controller cache flush to disk, too? >>> >>> >> If the card's cache has a battery, then the cache is preserved in the advent of crash/power loss etc - provided it has enough charge, so setting 'writeback' property on arrays is safe. The PERC/SERVERRAID cards I'm familiar (LSI Megaraid rebranded models) all switch to write-though mode if they detect the battery is dangerously discharged so this is not normally a problem (but commit/fsync performance will fall off a cliff when this happens)! >> >> Cheers >> >> Mark > > So a setting such as this: > > Device Name : /dev/sdb > Type : SAS > Read Policy : No Read Ahead > Write Policy : Write Back > Cache Policy : Not Applicable > Stripe Element Size : 64 KB > Disk Cache Policy : Enabled > > > Is sufficient to enable nobarrier then with these settings? > Hmm - that output looks different from the cards I'm familiar with. I'd want to see the manual entries for "Cache Policy=Not Applicable" and "Disk Cache Policy=Enabled" to understand what the settings actually mean. Assuming "Disk Cache Policy=Enabled" means what I think it does (i.e writes are cached in the physical drives cache), this setting seems wrong if your card has on board cache + battery, you would want to only cache 'em in the *card's* cache (too many caches to keep straight in one's head, lol). Cheers Mark