pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Scott Carey <scott@richrelevance.com>
Cc: Pierre C <lists@peufeu.com>
Cc: Kenneth Cox <kenstir@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Advice configuring ServeRAID 8k for performance
Date: Sun, 8 Aug 2010 01:50:59 -0600
Message-ID: <AANLkTimyF2gzBqeCVsVAz8oO0p++pRH0MXFuP9Y4np2P@mail.gmail.com> (raw)
In-Reply-To: <1C098DF3-A2AC-4A79-9281-A9B79ADAB1D5@richrelevance.com>
References: <op.vgy9k5ov5ru9c3@kent60.office.vivox.com>
	<op.vgzkohd0eorkce@apollo13>
	<AANLkTim1aV=oMHE0H+Uyw=wR0WQCcV8y_AK3aE3KLwme@mail.gmail.com>
	<1C098DF3-A2AC-4A79-9281-A9B79ADAB1D5@richrelevance.com>

On Sun, Aug 8, 2010 at 12:46 AM, Scott Carey <scott@richrelevance.com> wrote:
>
> On Aug 5, 2010, at 4:09 PM, Scott Marlowe wrote:
>
>> On Thu, Aug 5, 2010 at 4:27 PM, Pierre C <lists@peufeu.com> wrote:
>>>
>>>> 1) Should I switch to RAID 10 for performance?  I see things like "RAID 5
>>>> is bad for a DB" and "RAID 5 is slow with <= 6 drives" but I see little on
>>>> RAID 6.
>>>
>>> As others said, RAID6 is RAID5 + a hot spare.
>>>
>>> Basically when you UPDATE a row, at some point postgres will write the page
>>> which contains that row.
>>>
>>> RAID10 : write the page to all mirrors.
>>> RAID5/6 : write the page to the relevant disk. Read the corresponding page
>>> from all disks (minus one), compute parity, write parity.
>>
>> Actually it's not quite that bad.  You only have to read from two
>> disks, the data disk and the parity disk, then compute new parity and
>> write to both disks.  Still 2 reads / 2 writes for every write.
>>
>>> As you can see one small write will need to hog all drives in the array.
>>> RAID5/6 performance for small random writes is really, really bad.
>>>
>>> Databases like RAID10 for reads too because when you need some random data
>>> you can get it from any of the mirrors, so you get increased parallelism on
>>> reads too.
>>
>> Also for sequential access RAID-10 can read both drives in a pair
>> interleaved so you get 50% of the data you need from each drive and
>> double the read rate there.  This is even true for linux software md
>> RAID.
>
>
> My experience is that it is ONLY true for software RAID and ZFS.  Most hardware raid controllers read both mirrors and validate that the data is equal, and thus writing is about as fast as read.  Tested with Adaptec, 3Ware, Dell PERC 4/5/6, and LSI MegaRaid hardware wise.  In all cases it was clear that the hardware raid was not using data from the two mirrors to improve read performance for sequential or random I/O.

Interesting.  I'm using an Areca, I'll have to run some tests and see
if a mirror is reading at > 100% read speed of a single drive or not.



view thread (33+ messages)  latest in thread

Message-ID: <AANLkTimyF2gzBqeCVsVAz8oO0p++pRH0MXFuP9Y4np2P@mail.gmail.com>
Permalink:  ../AANLkTimyF2gzBqeCVsVAz8oO0p++pRH0MXFuP9Y4np2P@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTimyF2gzBqeCVsVAz8oO0p++pRH0MXFuP9Y4np2P@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, scott@richrelevance.com, lists@peufeu.com, kenstir@gmail.com
  Subject: Re: Advice configuring ServeRAID 8k for performance
  In-Reply-To: <AANLkTimyF2gzBqeCVsVAz8oO0p++pRH0MXFuP9Y4np2P@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox