Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm purchasing a server with 8 SAS disks to perform database intensive procedures. Currently the main bottleneck is is large index scans in postgres.

I'm currently deciding between 8x300Gb 10k disks or 8x140Gb 15k disks as it would be more convenient to have 200Gb+ Logical space.

The spec sheet for the RAID controller states: "Integrated Hardware RAID-0, -1, -1E, optional RAID-5, -6, -10, -50, -60"

What would be the best RAID configuration, and what choice in disks would be most suitable?

I'm new to configuring RAID and postgres and appreciate the advice.

share|improve this question
add comment

4 Answers

up vote 8 down vote accepted

Integrated Hardware RAID-0, -1, -1E, optional RAID-5, -6, -10, -50, -60

This sounds a little worrisome to me, it sounds like a low-end RAID controller. You want a good RAID controller that can keep up with 8 fast HDDs (that's actually not a given). If you have a fair amount of writes to your DB, then you really want a Battery Backup Unit, and to enable battery-protected write caching on the RAID controller.

As for RAID disk layout, there are 2 common schools of thought:

  1. 2 disks in mirror for OS, 2 disks in mirror for DB transaction log, 4 disks in RAID 10 for main DB files.
  2. One big RAID 10 array using all disks, and all OS + log + datastore files on this array (see reasoning here, mirrored by BAARF).

I would rather not take sides on the RAID volume design, it tends to become a bit of a fact-light discussion. Ideally you should experiment with different storage layouts and benchmark them for your specific workload. My gut feel is that all disks in RAID10 is faster and more robust over multiple workloads.

One last thing, to make sure that OS partitions and RAID stripe boundaries are aligned (see here, Windows centric, but the principle is general). You can do this when you create the partitions.

share|improve this answer
    
thanks. i'm assuming the 'optional' part is an upgraded unit which we'll probably opt for. does that still sound low end? –  pstanton Dec 21 '09 at 5:43
    
@pstanton: Yes, it still sounds low-end, because it could be a license key upgrade, not a new RAID controller. But there is no way for me to tell, you'll have to talk to your vendor about the controller performance, and perhaps battery backup capabilities. –  Jesper Mortensen Dec 21 '09 at 6:10
    
I couldn't agree with you more Jesper, this sounds very worrying to me also. –  Chopper3 Dec 21 '09 at 9:59
    
the upgrade for a RAID 10 controller is an IBM ServeRAID M5015, is that worrying? –  pstanton Dec 22 '09 at 2:38
    
... and is that better/worse than the HP Smart Array P410 ? –  pstanton Dec 22 '09 at 2:39
show 1 more comment

Go for the 8x146GB disks in a big RAID10 array (4 mirrored pairs striped together). This should provide you the best speed in terms of IO access.

share|improve this answer
    
does that mean with 4 mirrored pairs the logical disk space would be 146x2=292Gb? –  pstanton Dec 21 '09 at 5:01
    
No, it would be 146GB*4 since you've got four mirrored pairs of 146GB drives (so 584GB, less HDD manufacturer lie factor, filesystem and LVM overhead, etc). –  womble Dec 21 '09 at 7:39
add comment

You should read the information at BAARF the Battle Against Any RAID Five (Four, ...err..., Free). Therefore, the suggestion to go with RAID 10 is good.

And for database performance, use more faster disks (even if they're smaller) rather than fewer slower disks (even if they're bigger).

share|improve this answer
add comment

Don't forget to align your ext3/4 to your RAID stripe/stride size. (man mkfs.ext3/4 -> stride)

By the way, is there any postgres setting to make its write match the stripe size ?

(And google for RAID5 write hole)

share|improve this answer
    
Postgres will always do writes in 8Kb blocks. There is a compile time switch to change it, but usually you don't want to be touching that. –  Magnus Hagander Dec 21 '09 at 11:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.