Karim Nassar wrote:
"even in a two-disk server, you can put the transaction log onto the operating system disk and reap some benefits."
Context: I have a two disk server that is about to become dedicated to postgresql (it's a sun v40z running gentoo linux).
What's "theoretically better"?
1) OS and pg_xlog on one disk, rest of postgresql on the other? (if I understand the above correctly) 2) Everything striped Raid 0? 3) <some answer from someone smarter than me>
With 2 disks, you have 3 options, RAID0, RAID1, and 2 independent disks.
RAID0 - Fastest read and write speed. Not redundant, if either disk fails you lose everything on *both* disks.
RAID1 - Redundant, slow write speed, but should be fast read speed. If one disk fails, you have a backup.
2 independent - With pg_xlog on a separate disk, writing (updates) should stay reasonably fast. If one disk dies, you lose that disk, but not both.
How critical is your data? How update heavy versus read heavy, etc are you? Do you have a way to restore the database if something fails? If you do nightly pg_dumps, will you survive if you lose a days worth of transactions?
In general I would recommend RAID1, because that is the safe bet. If your db is the bottleneck, and your data isn't all that critical, and you are read heavy, I would probably go with RAID1, if you are write heavy I would say 2 independent disks.
Description: OpenPGP digital signature