From: | Aidan Van Dyk <aidan(at)highrise(dot)ca> |
---|---|
To: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
Cc: | Ogden <lists(at)darkstatic(dot)com>, pgsql-performance(at)postgresql(dot)org, Greg Smith <greg(at)2ndquadrant(dot)com> |
Subject: | Re: Raid 5 vs Raid 10 Benchmarks Using bonnie++ |
Date: | 2011-08-18 13:26:17 |
Message-ID: | CAC_2qU97zU=v0MzOtPKe4A_1Kj6ySN-+=Jn1rcTSeW1Ya1pC_w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Thu, Aug 18, 2011 at 1:35 AM, Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> 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?
The "barrier" is the linux fs/block way of saying "these writes need
to be on persistent media before I can depend on them". On typical
spinning media disks, that means out of the disk cache (which is not
persistent) and on platters. The way it assures that the writes are
on "persistant media" is with a "flush cache" type of command. The
"flush cache" is a close approximation to "make sure it's persistent".
If your cache is battery backed, it is now persistent, and there is no
need to "flush cache", hence the nobarrier option if you believe your
cache is persistent.
Now, make sure that even though your raid cache is persistent, your
disks have cache in write-through mode, cause it would suck for your
raid cache to "work", but believe the data is safely on disk and only
find out that it was in the disks (small) cache, and you're raid is
out of sync after an outage because of that... I believe most raid
cards will handle that correctly for you automatically.
a.
--
Aidan Van Dyk Create like a god,
aidan(at)highrise(dot)ca command like a king,
http://www.highrise.ca/ work like a slave.
From | Date | Subject | |
---|---|---|---|
Next Message | Ogden | 2011-08-18 14:09:30 | Re: Raid 5 vs Raid 10 Benchmarks Using bonnie++ |
Previous Message | Tomas Vondra | 2011-08-18 08:52:01 | Re: tunning strategy needed |