pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-performance@postgresql.org
Subject: Re: Tablespaces on a raid configuration
Date: Sat, 31 Mar 2012 03:32:31 +0200
Message-ID: <4F765EAF.3080406@fuzzy.cz> (raw)
In-Reply-To: <20120330145348.GS2533@aart.rice.edu>
References: <B75CD08C73BD3543B97E4EF3964B7D701E442099@CITESMBX5.ad.uillinois.edu>
	<20120330145348.GS2533@aart.rice.edu>

On 30.3.2012 16:53, ktm@rice.edu wrote:
> On Fri, Mar 30, 2012 at 02:45:36PM +0000, Campbell, Lance wrote:
>> PostgreSQL 9.0.x
>> When PostgreSQL  storage is using a relatively large raid  5 or 6 array is there any value in having your tables distributed across multiple tablespaces if those tablespaces will exists on the same raid array?  I understand the value if you were to have the tablespaces on different raid arrays.  But what about on the same one?
>>
>>
>> Thanks,
>>
>> Lance Campbell
>> Software Architect
>> Web Services at Public Affairs
>> 217-333-0382
>>
> 
> I have seen previous discussions about using different filesystems versus
> a single filesystem and one advantage that multiple tablespaces have is
> that an fsync on one table/tablespace would not block or be blocked by
> an fsync on a different table/tablespace at the OS level.

No. What matters is a physical device. If you have a drive that can do
just 120 seeks/fsyncs per second (or more, depends on the speed), then
even if you divide that into multiple filesystems you're still stuck
with the total of 120 seeks. I.e. splitting that into 10 partitions
won't give you 1200 seeks ...

OP mentions he's using RAID-5 or 6 - that's pretty bad because it
effectively creates one huge device. Splitting this into filesystem will
behave rather bad, because all the drives are rather tightly coupled
because of to the parity.

If you can create the filesystems on different devices, then you're
golden and this can really help.

And it's not just about fsync operations - WAL is written in sequential
manner. By placing it on the same device as data files you're
effectively forcing it to be written randomly, because the the database
has to write a WAL record, seeks somewhere else to read something, etc.

Tomas



view thread (8+ messages)  latest in thread

Message-ID: <4F765EAF.3080406@fuzzy.cz>
Permalink:  ../4F765EAF.3080406@fuzzy.cz/
Also on:    postgresql.org/message-id/4F765EAF.3080406@fuzzy.cz

 · 

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: tv@fuzzy.cz
  Subject: Re: Tablespaces on a raid configuration
  In-Reply-To: <4F765EAF.3080406@fuzzy.cz>

* 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