pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Lister <john.lister@kickstone.co.uk>
To: Craig James <cjames@emolecules.com>
Cc: Jan Nielsen <jan.sture.nielsen@gmail.com>
Cc: sthomas@peak6.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Configuration Recommendations
Date: Thu, 03 May 2012 21:27:34 +0100
Message-ID: <4FA2EA36.7080902@kickstone.co.uk> (raw)
In-Reply-To: <CAFwQ8rf=4mPwDv04bRJzq=VTYKAg7xbFiY3+0_BpkFyya=Db6Q@mail.gmail.com>
References: <CANxH4hGW+RYXsB8BdAY9hoGzje26EapX1H6H-jrNZAMQKZ+hMQ@mail.gmail.com>
	<4F96FFE1.2030809@peak6.com>
	<4F97ABBB.1000708@kickstone.co.uk>
	<4F986CAC.4060904@peak6.com>
	<CANxH4hE2WTvLJeVXz-o4npvOdoHvh1GLQjt=eYjErSQKdo7anQ@mail.gmail.com>
	<4FA22B92.6050103@kickstone.co.uk>
	<CANxH4hFOgu5qQHehnxqm5kL=XHAOZ9aqC7jKUMxtq+ULqXokDg@mail.gmail.com>
	<CAFwQ8rf=4mPwDv04bRJzq=VTYKAg7xbFiY3+0_BpkFyya=Db6Q@mail.gmail.com>

On 03/05/2012 16:46, Craig James wrote:
> On Thu, May 3, 2012 at 6:42 AM, Jan Nielsen<jan.sture.nielsen@gmail.com>  wrote:
>> Hi John,
>>
>> On Thu, May 3, 2012 at 12:54 AM, John Lister<john.lister@kickstone.co.uk>
>> wrote:
>>> I was wondering if it would be better to put the xlog on the same disk as
>>> the OS? Apart from the occasional log writes I'd have thought most OS data
>>> is loaded into cache at the beginning, so you effectively have an unused
>>> disk. This gives you another spindle (mirrored) for your data.
>>>
>>> Or have I missed something fundamental?
>> I followed Gregory Smith's arguments from PostgreSQL 9.0 High Performance,
>> wherein he notes that WAL is sequential with constant cache flushes whereas
>> OS is a mix of sequential and random with rare cache flushes. This (might)
>> lead one to conclude that separating these would be good for at least the
>> WAL and likely both. Regardless, separating these very different
>> use-patterns seems like a "Good Thing" if tuning is ever needed for either.
> Another consideration is journaling vs. non-journaling file systems.
> If the WAL is on its own file system (not necessarily its own
> spindle), you can use a non-journaling file system like ext2.  The WAL
> is actually quite small and is itself a journal, so there's no reason
> to use a journaling file system.  On the other hand, you don't want
> the operating system on ext2 because it takes a long time to recover
> from a crash.
>
> I think you're right about the OS: once it starts, there is very
> little disk activity.  I'd say put both on the same disk but on
> different partitions.  The OS can use ext4 or some other modern
> journaling file system, and the WAL can use ext2.  This also means you
> can put the WAL on the outer (fastest) part of the disk and leave the
> slow inner tracks for the OS.
>
Sorry I wasn't clear, I was thinking that the WAL and OS would go on 
different partitions (for the reasons stated previously that the OS 
could fill its partition) but that they share a disk/spindle - some 
nomenclature issues here I think. This would free up another (pair of) 
spindle(s) for the data which would seem much more beneficial in terms 
of performance than the WAL being separate...

In terms of the caching issues, I'm guessing that you would be sharing 
the same cache regardless of whether the OS and WAL are on the same 
disk(s) or not - unless you stick the WAL on a separate raid/disk 
controller to the OS...

John

-- 
www.pricegoblin.co.uk




view thread (31+ messages)  latest in thread

Message-ID: <4FA2EA36.7080902@kickstone.co.uk>
Permalink:  ../4FA2EA36.7080902@kickstone.co.uk/
Also on:    postgresql.org/message-id/4FA2EA36.7080902@kickstone.co.uk

 · 

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.lister@kickstone.co.uk, cjames@emolecules.com, jan.sture.nielsen@gmail.com, sthomas@peak6.com
  Subject: Re: Configuration Recommendations
  In-Reply-To: <4FA2EA36.7080902@kickstone.co.uk>

* 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