pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig James <craig_james@emolecules.com>
To: Joshua D. Drake <jd@commandprompt.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: How to allocate 8 disks
Date: Sat, 01 Mar 2008 13:53:32 -0800
Message-ID: <47C9D05C.3040908@emolecules.com> (raw)
In-Reply-To: <20080301130347.0832b323@commandprompt.com>
References: <1204285894.11773.33.camel@franck-gusty>
	<dcc563d10802290613v482f52dr43ea95b52886de31@mail.gmail.com>
	<1204296705.11773.51.camel@franck-gusty>
	<Pine.GSO.4.64.0802291019570.28452@westnet.com>
	<47C88826.4040209@paradise.net.nz>
	<47C99B3E.4010606@emolecules.com>
	<20080301130347.0832b323@commandprompt.com>

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, and can 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 to know all of the tradeoffs, so that I can weigh performance, reliability, and cost and make the right choice.

So my question still stands: From a strictly performance point of view, would it be better to separate the OS and the WAL onto two disks?  Is there any performance advantage to RAID 1?  My understanding is that RAID 1 can give 2x seek performance during 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.

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 data would come from 4 disks instead of six.

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

This is a dedicated system and does nothing but Apache/Postgres, so the OS should get very little traffic.  But if that's the case, I guess you could argue that your suggestion of combining OS and WAL on a 2-disk RAID 1 would be the way to go, since the OS activity wouldn't affect the WAL very much.

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?

Thanks,
Craig



view thread (14+ messages)  latest in thread

Message-ID: <47C9D05C.3040908@emolecules.com>
Permalink:  ../47C9D05C.3040908@emolecules.com/
Also on:    postgresql.org/message-id/47C9D05C.3040908@emolecules.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: craig_james@emolecules.com, jd@commandprompt.com
  Subject: Re: How to allocate 8 disks
  In-Reply-To: <47C9D05C.3040908@emolecules.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