[wplug] Thoughts & Considerations for email server

Michael Skowvron michaels at penguincentral.org
Sun Aug 19 21:23:53 EDT 2007


Kevin Squire wrote:
  >   The boss loves RAID 5 (it has saved his life more then once) and in
>   June when we started the setup, I did not know any different.  What 
>   you have given me is very interesting - will need to read some more,
>   and will take this info back to him.

There have been some very negative comments made against RAID-5 and I 
want provide a counterpoint. RAID-5 is _NOT_ known the world over for 
lousy performance. And it doesn't have to suffer from poor write 
performance. I do a lot of filesystem and RAID tuning for my customers 
and I've seen my share of underperforming setups. Usually, the poor 
throughput is caused by not configuring the filesystems and hardware to 
match the workload. Sometimes, there just isn't enough hardware to 
deliver the needed performance.

Getting the best throughput out of a RAID-5 array depends on:
  - Choosing an appropriate segment size for the RAID stripe
  - Sending segment size or stripe size IO to the controller
  - Ensuring that the write requests are properly aligned
  - Using write caching and Command Tag Queuing

If all of these are properly configured, RAID-5 performance will be as 
good as the particular controller is able to deliver. With a good 
controller, RAID-5 and RAID-10 can be comparable. At that point it's 
only a matter of properly scaling the array to the required performance 
level for the workload.

Unfortunately, it can sometimes be very difficult and sometimes it can 
be impossible to achieve these 4 requirements. Not all filesystems can 
be configured to do proper IO on Linux and other features such as LVM 
can completely prevent the kernel from issuing proper IO. In other 
words, it's really easy to configure really badly performing hardware 
RAID-5 filesystems on Linux. From a performance standpoint, the software 
RAID-5 is able to properly deal with many of these requirements and 
software RAID-5 on Linux can perform very well. This is just a technical 
assesment based on the above requirements and I am not implying that you 
use software RAID.

It's wrong to arbitrarily state that RAID-5 is bad for this or that or 
that RAID-10 is the _only_ way to go. RAID-10 is easy and more forgiving 
because you can be less concerned about (or can be ignorant of) the four 
points above. RAID-10 can be a lot more expensive because of the mirror, 
but that's part of the price you pay for RAID-10's advantages. RAID-5's 
advantages of storage efficiency tend to make it very popular.

When specifying ANY storage system, what matters is that you know your 
expected workload in terms of average IO size and number of IO 
operations per second (IOPS). Then you can determine how best to get 
that number of IOPS, whether it be with RAID-10 for all it's advantages 
of with RAID-5 for it's advantages.

Since, each drive in the array can deliver a certain number of IOPS, an 
8 drive RAID-5 can handle roughly 2x the number of IOPS as a 4 drive 
RAID-5. Also know that 10K and 15K SCSI drives can deliver 3x-5x the 
number of IOPS compared to a 7200RPM SATA drive. If you're limited to 4 
drive slots, 4 SCSI drives are going to net you a lot more IOPS than 4 
SATAs -- especially for your workload. Ingesting mail will require a lot 
of simultaneous reading and writing as the message passes from Postfix, 
to spamd, to amavis, etc. SCSI drives are designed for this type of 
workload, SATA drives are not.

Michael



More information about the wplug mailing list