Re: Advice configuring ServeRAID 8k for performance - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Advice configuring ServeRAID 8k for performance
Date
Msg-id AANLkTim1aV=oMHE0H+Uyw=wR0WQCcV8y_AK3aE3KLwme@mail.gmail.com
Whole thread Raw
In response to Re: Advice configuring ServeRAID 8k for performance  ("Pierre C" <lists@peufeu.com>)
Responses Re: Advice configuring ServeRAID 8k for performance
List pgsql-performance
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.

>> with good redundancy.  My current performance is 85MB/s write, 151 MB/s
>> reads
>
> FYI, I get 200 MB/s sequential out of the software RAID5 of 3 cheap desktop
> consumer SATA drives in my home multimedia server...

On a machine NOT configured for max seq throughput (it's used for
mostly OLTP stuff) I get 325M/s both read and write speed with a 26
disk RAID-10.  OTOH, that setup gets ~6000 to 7000 transactions per
second with multi-day runs of pgbench.

pgsql-performance by date:

Previous
From: Craig James
Date:
Subject: Re: Advice configuring ServeRAID 8k for performance
Next
From: Dave Crooke
Date:
Subject: Re: Advice configuring ServeRAID 8k for performance