pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Harold <tgh@tgharold.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: two disks - best way to use them?
Date: Mon, 05 Dec 2005 10:48:24 -0500
Message-ID: <43946148.9010607@tgharold.com> (raw)
In-Reply-To: <6.2.5.6.0.20051202145746.01dc7b68@earthlink.net>
References: <00fb01c5f772$59471410$0200a8c0@dell8200>
	<6.2.5.6.0.20051202145746.01dc7b68@earthlink.net>

Ron wrote:

> At 01:58 PM 12/2/2005, Rick Schumeyer wrote:
> 
>> I installed another drive in my linux pc in an attempt to improve 
>> performance
>> on a large COPY to a table with a geometry index.
>>
>> Based on previous discussion, it seems there are three things 
>> competing for the hard drive:
>>
>> 1)       the input data file
>> 2)       the pg table
>> 3)       the WAL
>>
>> What is the best way to distribute these among two drives?  From Tom's 
>> comments
>> I would think that the pg table and the WAL should be separate.  Does 
>> it matter where the input data is?
> 
> 
> Best is to have 3 HD or HD sets, one for each of the above.
> 
> With only 2, and assuming the input file is too large to fit completely 
> into RAM at once, I'd test to see whether:
> a=  input on one + pg table & WAL on the other, or
> b= WAL on one + pg table & input file on the other
> is best.
> 
> If the input file can be made 100% RAM resident, then use
> c= pg table on one + WAL and input file on the other.
> 
> The big goal here is to minimize HD head seeks.

(noob question incoming)

Section 26.4 WAL Internals
http://www.postgresql.org/docs/8.1/interactive/wal-internals.html

This seems to be the applicable chapter.  They talk about creating a 
symlink for the data/pg_xlog folder to point at another disk set.

If I have (2) RAID1 sets with LVM2, can I instead create a logical 
volume on the 2nd disk set and just mount data/pg_xlog to point at the 
logical volume on the 2nd disk set?

For example, I have an LVM on my primary mirror called 'pgsql'.  And 
I've created a 2nd LVM on my secondary mirror called 'pgxlog'.  These 
are mounted as:

/dev/vgraida/pgsql on /var/lib/postgresql type ext3 (rw,noatime)

/dev/vgraidb/pgxlog on /var/lib/postgresql/data/pg_xlog type ext3 
(rw,noatime)

 From the application's P.O.V., it's the same thing, right? (It seems to 
be working, I'm just trying to double-check that I'm not missing something.)





view thread (11+ messages)  latest in thread

Message-ID: <43946148.9010607@tgharold.com>
Permalink:  ../43946148.9010607@tgharold.com/
Also on:    postgresql.org/message-id/43946148.9010607@tgharold.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: tgh@tgharold.com
  Subject: Re: two disks - best way to use them?
  In-Reply-To: <43946148.9010607@tgharold.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