Re: How to allocate 8 disks - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: How to allocate 8 disks
Date
Msg-id dcc563d10803011430s4a9d6ef5l2f9ed0c457f505c5@mail.gmail.com
Whole thread Raw
In response to Re: How to allocate 8 disks  (Craig James <craig_james@emolecules.com>)
List pgsql-performance
On Sat, Mar 1, 2008 at 3:53 PM, Craig James <craig_james@emolecules.com> wrote:
> Joshua D. Drake wrote:
>  > On Sat, 01 Mar 2008 10:06:54 -0800
>  > Craig James <craig_james@emolecules.com> wrote:
>  >
>  >> We're upgrading to a medium-sized server, a Dell PowerEdge 2950,
>  >> dual-quad CPU's and 8 GB memory.  This box can hold at most 8 disks
>  >> (10K SCSI 2.5" 146 GB drives) and has Dell's Perc 6/i RAID controller.
>  >>
>  >> I'm thinking of this:
>  >>
>  >>   6 disks  RAID 1+0  Postgres data
>  >>   1 disk   WAL
>  >>   1 disk   Linux
>  >>
>  >> I've often seen RAID 1 recommended for the WAL.  Is that strictly for
>  >> reliability, or is there a performance advantage to RAID 1 for the
>  >> WAL?
>  >>
>  >> It seems to me separating the OS and WAL on two disks is better than
>  >> making a single RAID 1 and sharing it, from a performance point of
>  >> view.
>  >
>  > This scares me... You lose WAL you are a goner. Combine your OS and
>  > WAL into a RAID 1.
>
>  Right, I do understand that, but reliability is not a top priority in this system.  The database will be replicated,
andcan be reproduced from the raw data.  It's not an accounting system, it finds scientific results.  That's not to say
I*won't* take your advice, we may in fact combine the OS and WAL on one disk.  Reliability is a good thing, but I need
toknow all of the tradeoffs, so that I can weigh performance, reliability, and cost and make the right choice. 

In that case you could always make the data partition a 6 disk RAID-0.

>  So my question still stands: From a strictly performance point of view, would it be better to separate the OS and
theWAL onto two disks?  Is there any performance advantage to RAID 1?  My understanding is that RAID 1 can give 2x seek
performanceduring read, but no advantage during write.  For the WAL, it seems to me that RAID 1 has no performance
benefits,so separating the WAL and OS seems like a peformance advantage. 

Yes, Only on Reads.  Correct.

>  Another option would be:
>
>
>   4 disks   RAID 1+0  Postgres data
>   2 disks   RAID 1    WAL
>   1 disk    Linux
>   1 disk    spare
>
>  This would give us reliability, but I think the performance would be considerably worse, since the primary Postgres
datawould come from 4 disks instead of six. 

Performance-wise, RAID-10 with n disks is about the same as RAID-0
with n/2 disks.  So, you're losing abot 1/3 of your peak performance,
assuming 100% efficient controllers and you aren't bottlenecking I/O
with > 4 disks.

>  I guess we could also consider:
>
>
>   4 disks   RAID 1+0  Postgres data
>   4 disks   RAID 1+0  WAL and Linux
>
>  Or even
>
>   8 disks   RAID 1+0  Everything

It really depends on the controller.  Battery backed write cache?
Then the one big everything is often faster than any other method.  No
BB cache?  Then splitting them up will help.

>  I suppose the thing to do is get the system, and run bonnie on various configurations.  I've never run bonnie before
--can I get some useful results without a huge learning curve? 

Yes, it's fairly easy to drive.  It'll tell you more about your
controller than anything else, which is very useful information.  The
way a different controllers behaves with different configurations can
be very very different from one controller to the next.

pgsql-performance by date:

Previous
From: Craig James
Date:
Subject: Re: How to allocate 8 disks
Next
From: Greg Smith
Date:
Subject: Re: 12 disks raid setup