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'd like some advice on common ways, if there is such a thing, to set up the partitions and raid on a RHAS5.3 server running postgressql which is expected to maintain a 500Gb database. The database will be read-only for the most part, with 8-10 bulk loads per day, old data purges twice a week

We'll have 4 300Gb disks available.

How should I create the partitions/volumes, for the OS and for the database(and anything else ?)

And what'd be a suitable raid setup, Raid0,1,1+0.3.6 is available.

share|improve this question

4 Answers 4

The general consensus on SF I've seen so far is RAID 10 with JFS or Ext3 as the filesystem (I'll dig around for the links and re-edit in a few minutes...)

If these are the only drives, then it becomes a little bit tight - the boot partition will be off of your RAID array but it should assemble and run just fine, so a single partition for the OS and the (bulk) remainder for your data. Hopefully this is not the case, and you'll have an additional (5th) drive available...

If you encounter any interesting information, I'd be happy to update the PostgreSQL Tips'n'Tricks wiki with that info. Thanks!


Some related questions

Recommended disk/partition setup for a SQL Server

Should I run my database off of a RAID 5 configuration?

What is the best Linux filesystem for MySQL (InnoDB)?

share|improve this answer

The usual recommendation for databases is RAID10, as it performs better (often much better) for writes than RAID6 or RAID5.

As you are expecting very little by way of write operations, RAID6 may be better for you than RAID10 as it offers better redundancy in some circumstances and may perform better than RAID10 for reads.

Summary of pros/cons:

  • RAID10 of 4 drives: gives two drives worth of space (~600G in your case), can survive 4 of the six possible "a second drive dies before the first dead one is replaced and the array rebuilt" scenarios and any single drive failure. Read performance will, depending on your controller/software and access pattern, be somewhere between a single drive and a RAID0 stripe-set, and write performance will be similar to that of a single drive.
  • RAID6 of 4 drives: gives two drives worth of space (~600G in your case), can survive any single or two drive failure. Read performance should be similar to RAID0. Write performance can be bad as a block write (or partial block write) becomes a block read (the other in the stripe pair) followed by three writes (the updated block to one disk and the two parity blocks to others)
  • RAID5 of 4 drives: gives three drives worth of space (~900G in your case), can survive any single drive failure but will be lost if two drives fail at once. Read performance should be similar to RAID0. Write performance can be bad as a block write (or partial block write) becomes two block reads (the other data blocks in the stripe set) followed by two writes (the updated block to one disk and the parity blocks to another)

Any write activity on a RAID 5 or 6 volume will involve all the drives in some way (reading or writing). With RAID10 any single write operation will only involve two of the four drives.

share|improve this answer

One of the biggest performance boosts we found when setting up a big Postgresql machine on Centos5 was keeping the data directory on a RAID10 separate from that used by the main OS. You want as many of those drive heads as possible working to find data for you.

Also, take the time to tune your Postgres install, as the default one provided when you install the package is pretty meh performance-wise. Since you're expecting to be pretty read-oriented, you might be able to squeak out a little extra performance by tuning for that workload.

share|improve this answer

In general, RAID-10 is the optimal choice.

In a busy server scenario, a disk failure on a RAID-5 system will compromise the performance of the system, a problem that will be compounded when you replace the disk and rebuild the array. RAID-10 will result in no impact to the end-user, and the impact on service delivery when you replace the failed disk is much less.

RAID-6 can give you the ability to survive two simultaneous drive failures, but IMHO that isn't a valid claim, as performance of the volumes in question will be compromised severely. Also, provided that you have adequate backup, the extra level of redundancy doesn't buy much, since you always have the option of restoring your data anyway.

share|improve this answer

Your Answer

 
discard

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