postgres installation - best configuration?

Started by David Kennedyalmost 23 years ago4 messages
#1David Kennedy
satch@biteme.bigpond.net.au

Hello all,

I realise this is a little off-topic, however I have been unable to find a
more
suitable newsgroup aside from linux.postgres which is basically dead.

This weekend I will be building a couple of new postgres database servers
under RH7.3, and I am currently deciding between 2 different configuration
options. The new servers feature hot-swappable RAID w/ 3 hard drives in
each.

Option #1
Use one drive for the linux boot partition, a second for the database data,
and the third to store the indexes. I have heard this can offer a reasonable
performance advantage by reducing the read/writes on any particular SCSI
channel/drive and speeding up lookups due to the dedicated index drive.

Option #2
Simply set the server up with RAID level 5 and run everything from the one
RAID partition. This would allow us to take advantage of the hot-swappable
features and would probably be more reliable.

From my understanding of hardware RAID, the striped disk array should offer
optimum performance anyway, as the read/writes would be striped in clusters
across the disks, however I can see how the use of the dedicated index drive
would speed up the use of indexes (but with reduced performance on the data
reads in comparison to RAID).

If anyone has experience with either of these configurations, or can offer
any other suggestions for best performance/reliability I would really
appreciate the input.

Thank you in advance.

--
David Kennedy
ALFCO Communications

#2Curt Sampson
cjs@cynic.net
In reply to: David Kennedy (#1)
Re: postgres installation - best configuration?

On Thu, 23 Jan 2003, David Kennedy wrote:

This weekend I will be building a couple of new postgres database servers
under RH7.3, and I am currently deciding between 2 different configuration
options. The new servers feature hot-swappable RAID w/ 3 hard drives in
each.

It depends on what you need in terms of reliability and performance.

Best performance (assuming non-insignifcant write load):

Put the OS and DB on the first two drives, striped (RAID0), and the
logs on the third drive.

Best safety maximum capacity:

Put everything on a single RAID5 across all three drives. (RAID5 on
three drives is likely to be significantly slower than a single disk
or mirrored pair would be, though.)

Best safety with good performance:

Mirror two drives (RAID1) and put everything on the pair. Use the
third drive as a hot spare for the mirrored pair.

cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Curt Sampson (#2)
Re: postgres installation - best configuration?

Also, I have heard a lot of people reocommending RAID 0+1 or 1+0 as a
good mix of reliability and performance.

---------------------------------------------------------------------------

Curt Sampson wrote:

On Thu, 23 Jan 2003, David Kennedy wrote:

This weekend I will be building a couple of new postgres database servers
under RH7.3, and I am currently deciding between 2 different configuration
options. The new servers feature hot-swappable RAID w/ 3 hard drives in
each.

It depends on what you need in terms of reliability and performance.

Best performance (assuming non-insignifcant write load):

Put the OS and DB on the first two drives, striped (RAID0), and the
logs on the third drive.

Best safety maximum capacity:

Put everything on a single RAID5 across all three drives. (RAID5 on
three drives is likely to be significantly slower than a single disk
or mirrored pair would be, though.)

Best safety with good performance:

Mirror two drives (RAID1) and put everything on the pair. Use the
third drive as a hot spare for the mirrored pair.

cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Curt Sampson
cjs@cynic.net
In reply to: Bruce Momjian (#3)
Re: postgres installation - best configuration?

On Fri, 31 Jan 2003, Bruce Momjian wrote:

Also, I have heard a lot of people reocommending RAID 0+1 or 1+0 as a
good mix of reliability and performance.

Right. Striping across mirrored drives will definitely be better, but
you can't do that with only three drives.

cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC