Re: What's better: Raid 0 or disk for seperate pg_xlog

From: John A Meinel <john(at)arbash-meinel(dot)com>
To: Karim Nassar <Karim(dot)Nassar(at)acm(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: What's better: Raid 0 or disk for seperate pg_xlog
Date: 2005-03-10 15:26:51
Message-ID: 4230673B.3020400@arbash-meinel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Karim Nassar wrote:

>From rom http://www.powerpostgresql.com/PerfList/
>
>"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>
>
>TIA,
>
>
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.

John
=:->

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mario Weilguni 2005-03-10 16:41:28 Re: What's better: Raid 0 or disk for seperate pg_xlog
Previous Message David Brown 2005-03-10 14:14:36 Re: What's better: Raid 0 or disk for seperate pg_xlog