Article about PostgreSQL and RAID in Brazil - Mailing list pgsql-performance

From Josh Berkus
Subject Article about PostgreSQL and RAID in Brazil
Date
Msg-id 200409161050.33289.josh@agliodbs.com
Whole thread Raw
Responses Re: Article about PostgreSQL and RAID in Brazil
Re: Article about PostgreSQL and RAID in Brazil
Re: Article about PostgreSQL and RAID in Brazil
List pgsql-performance
Ricardo,

Hello.   I've moved your query to a more appropriate mailing list; on
PERFORMANCE we discuss RAID all the time.  If you don't mind wading through a
host of opinions, you'll get plenty here.  I've also cc'd our Brazillian
PostgreSQL community.

Everyone, please note that Ricardo is NOT subscribed so cc him on your
responses.

Here's Ricardo's question.   My response is below it.

===============================================
Let me introduce, I'm Ricardo Rezende and I'm SQL Magazine subeditor, from
Brazil (http://www.sqlmagazine.com.br.).

My goal in this first contact is to solve a doubt about PostgreSQL RDBMS.

I'm writing an article about redundant storage technology, called RAID.
The first part of the article can be found in
http://www.sqlmagazine.com.br/colunistas.asp?artigo=Colunistas/RicardoRezende/06_Raid_P1.asp

My ideia is to put, in the end of the article, a note about the better
configuration of RAID to use with PostgreSQL and the reasons, including
the reference to the autor/link to this information.

Could you send me this information?

Our magazine is being a reference between DBAs and Database Developers in
Brazil and that is the reason to write "oficial" papers about PostgreSQL

Thank you very much and I'm waiting for a return of this e-mail.
=========================================================

The first and most important step for RAID performance with PostgreSQL is to
get a card with onboard battery back-up and enable the write cache for the
card.   You do not want to enable the write cache *without* battery back-up
because of the risk of data corruption after a power failure.

If you can't afford this hardware, I would advise using software RAID over
using a cheaper (< $300US) RAID card.

The second step is to have lots of disks; 5 drives is a minimum for really
good performance.   3-drive RAID5, in particular, is a poor performer for
PostgreSQL, often resulting in I/O that is 40% or less as efficient as a
single disk due to extremely slow random seeks and little parallelization.

Once you have 6 drives or more, opinions are divided on whether RAID 10 or
RAID 5 is better.   I think it partly depends on your access pattern.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-performance by date:

Previous
From: Daniel Ceregatti
Date:
Subject: Re: Comparing user attributes with bitwise operators
Next
From: Tom Lane
Date:
Subject: Re: declared cursor uses slow plan