RAID-5 and database servers

Eric Rostetter rostetter at
Tue Mar 9 20:48:14 CST 2010

Quoting "John G. Heim" <jheim at>:

> Has anyone configured a database server with RAID-5?

Sure...  Most people don't, but some workloads might benefit from it.

> Is it really a bad idea
> to do so?

Depends on your workload...  If it is a mostly read-intensive database, it
would be fine.  It it is a mostly write-intensive database, it would most
likely be very bad, unless you have a very light load.

> But is it better to do RAID-1 or RAID-5. I can't

I recommend RAID-10 for the database files.  You can do multiple raid levels
for different disks (system on raid-1, DB on raid-10, etc).

> figure out why RAID-1 would be better than RAID-5. I understand that with
> RAID-5, a single database write might translate into writing 2 blocks (a
> data block and a parity block). But doesn't RAID-1 *always* do an extra
> write for every data block written?

RAID-1 always does a write to both disks, so it is slow writing.   But it
can then read from either or both disks, so it is up to twice as fast as
a single disk.

RAID-5 is slow because it has to split the data into N pieces, calculate
the parity, then write out N+1 writes (1 each to N+1 disks).  But because
it writes the N+1 in parallel, and reads the N in parallel, it is rather
fast especially at reads...

RAID-10 does a combination (split and stripe across disks similar to RAID-5,
but at the same time mirror it like RAID-1 across stripes).  It is the most
robust version (as far as disk loss goes), and is often the fastest, though
as always that depends on your workload and your setup.

You could use any of the RAID levels 1, 5, 6, or 10...  Which is _best_
depends on your budget and your workload...

To properly set this up, you need to know your workload...  How much data?
Mostly read or mostly write or a good read/write mix?  Large data requests
or small data requests?  Stuff like that can have a big impact on which disk
layout is best...

Eric Rostetter
The Department of Physics
The University of Texas at Austin

Go Longhorns!

More information about the Linux-PowerEdge mailing list