Skip site navigation (1) Skip section navigation (2)

Re: With 4 disks should I go for RAID 5 or RAID 10

From: david(at)lang(dot)hm
To: Fernando Hevia <fhevia(at)ip-tel(dot)com(dot)ar>
Cc: "'Mark Mielke'" <mark(at)mark(dot)mielke(dot)cc>, "'pgsql-performance'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: With 4 disks should I go for RAID 5 or RAID 10
Date: 2007-12-26 21:28:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Wed, 26 Dec 2007, Fernando Hevia wrote:

> Mark Mielke Wrote:
>> In my experience, software RAID 5 is horrible. Write performance can
>> decrease below the speed of one disk on its own, and read performance will
>> not be significantly more than RAID 1+0 as the number of stripes has only
>> increased from 2 to 3, and if reading while writing, you will not get 3X as
>> RAID 5 write requires at least two disks to be involved. I believe hardware
>> RAID 5 is also horrible, but since the hardware hides it from the
>> application, a hardware RAID 5 user might not care.
>> Software RAID 1+0 works fine on Linux with 4 disks. This is the setup I use
>> for my personal server.
> I will use software RAID so RAID 1+0 seems to be the obvious choice.
> Thanks for the advice!

to clarify things a bit more.

with only four drives the space difference between raid 1+0 and raid 5 
isn't that much, but when you do a write you must write to two drives (the 
drive holding the data you are changing, and the drive that holds the 
parity data for that stripe, possibly needing to read the old parity data 
first, resulting in stalling for seek/read/calculate/seek/write since 
the drive moves on after the read), when you read you must read _all_ 
drives in the set to check the data integrity.

for seek heavy workloads (which almost every database application is) the 
extra seeks involved can be murder on your performance. if your workload 
is large sequential reads/writes, and you can let the OS buffer things for 
you, the performance of raid 5 is much better.

on the other hand, doing raid 6 (instead of raid 5) gives you extra data 
protection in exchange for the performance hit, but with only 4 drives 
this probably isn't what you are looking for.

Linux software raid can do more then two disks in a mirror, so you may be 
able to get the added protection with raid 1 sets (again, probably not 
relavent to four drives), although there were bugs in this within the last 
six months or so, so you need to be sure your kernel is new enough to have 
the fix.

now, if you can afford solid-state drives which don't have noticable seek 
times, things are completely different ;-)

David Lang

In response to


pgsql-performance by date

Next:From: Heikki LinnakangasDate: 2007-12-26 21:35:59
Subject: Re: pg_dump performance
Previous:From: Bill MoranDate: 2007-12-26 21:14:30
Subject: Re: With 4 disks should I go for RAID 5 or RAID 10

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group