pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John A Meinel <john@arbash-meinel.com>
To: Karim Nassar <Karim.Nassar@acm.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: What's better: Raid 0 or disk for seperate pg_xlog
Date: Thu, 10 Mar 2005 09:26:51 -0600
Message-ID: <4230673B.3020400@arbash-meinel.com> (raw)
In-Reply-To: <1110440684.6368.163.camel@k2.cet.nau.edu>
References: <1110440684.6368.163.camel@k2.cet.nau.edu>

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
=:->

Attachments:

  signature.asc (application/pgp-signature, 252B) download

view thread (7+ messages)  latest in thread

Message-ID: <4230673B.3020400@arbash-meinel.com>
Permalink:  ../4230673B.3020400@arbash-meinel.com/
Also on:    postgresql.org/message-id/4230673B.3020400@arbash-meinel.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: john@arbash-meinel.com, Karim.Nassar@acm.org
  Subject: Re: What's better: Raid 0 or disk for seperate pg_xlog
  In-Reply-To: <4230673B.3020400@arbash-meinel.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox