2

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.

4 Answers 4

9

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.

6
  • 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, 2009 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.
    – user2874
    Dec 21, 2009 at 6:10
  • I couldn't agree with you more Jesper, this sounds very worrying to me also.
    – Chopper3
    Dec 21, 2009 at 9:59
  • the upgrade for a RAID 10 controller is an IBM ServeRAID M5015, is that worrying?
    – pstanton
    Dec 22, 2009 at 2:38
  • ... and is that better/worse than the HP Smart Array P410 ?
    – pstanton
    Dec 22, 2009 at 2:39
7

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.

2
  • does that mean with 4 mirrored pairs the logical disk space would be 146x2=292Gb?
    – pstanton
    Dec 21, 2009 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, 2009 at 7:39
1

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).

0

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)

1
  • 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. Dec 21, 2009 at 11:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .