[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Optimal Postgres setup with 6 disks total (including OS)



Thanks for the tip on bonnie++ I hadn't heard of it.

Craig Sanders wrote:
On Tue, Dec 05, 2006 at 07:59:39PM -0800, Josh Bonnett wrote:
Hi, I am looking at buying a server with 6 36gb 15k rpm scsi disks
in it and I was wondering what people would recommend for a disk
setup. The six need to include the os and such. As it is right now
we are thinking 1 4 disk raid 1+0 volume for postgres and 1 raid 1
volume for os and the swap file. Getting a 7th disk is economically
impractical. What do people think?  This is a fairly write heavy db
compared to some so I was thinking it would be good to avoid raid 5 or
am I wrong here? What do people think?

write speed isn't so bad on RAID 5 as long as you have a hardware raid
controller with a large (128MB+) non-volatile write-cache.

but really, the only way to be sure is to test it with your exact hardware.

for testing, stick in a smallish boot drive (whatever you have spare)
and install debian on it. then reconfigure the raid disks in various
ways (and formatted using various filesystems - ext3, xfs, reiser,
whatever) and run bonnie++ on it each time.

should take about a day or so to run all the tests....but well worth it.

when you've found the best performance (or acceptable performance with
best size), remove the test boot drive and rebuild the machine in its
final configuration.

for a long-lived server, this is pretty much the only way to guarantee
getting the best performance. in theory, raid 1+0 should beat raid 5,
but practice has a way of trumping theory every time.




NOTE: non-volatile (i.e. battery-backup) cache is essential - it saves
your data in case of power failure or crash. most good scsi hardware
raid controllers have battery-backup for the cache as an option.

craig





Reply to: