From: Peter Koczan <pjkoczan@gmail.com>
To: Carlos Moreno <moreno_pg@mochima.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Tablespaces and NFS
Date: Wed, 19 Sep 2007 16:54:22 -0500
Message-ID: <4544e0330709191454x2b125cc0j40c57977a0106cb4@mail.gmail.com> (raw)
In-Reply-To: <46F1471A.1010501@mochima.com>
References: <46F1471A.1010501@mochima.com>
On 9/19/07, Carlos Moreno <moreno_pg@mochima.com> wrote:
> Hi,
>
> Anyone has tried a setup combining tablespaces with NFS-mounted partitions?
>
> I'm considering the idea as a performance-booster --- our problem is
> that we are
> renting our dedicated server from a hoster that does not offer much
> flexibility
> in terms of custom hardware configuration; so, the *ideal* alternative
> to load
> the machine with 4 or 6 hard drives and use tablespaces is off the table
> (no pun
> intended).
>
> We could, however, set up a few additional servers where we could configure
> NFS shares, mount them on the main PostgreSQL server, and configure
> tablespaces to "load balance" the access to disk.
>
> Would you estimate that this will indeed boost performance?? (our system
> does lots of writing to DB --- in all forms: inserts, updates, and deletes)
>
> As a corollary question: what about the WALs and tablespaces?? Are the
> WALs "distributed" when we setup a tablespace and create tables in it?
> (that is, are the WALs corresponding to the tables in a tablespace stored
> in the directory corresponding to the tablespace? Or is it only the
> data, and
> the WAL keeps being the one and only?)
>
> Thanks,
>
> Carlos
About 5 months ago, I did an experiment serving tablespaces out of
AFS, another shared file system.
You can read my full post at
http://archives.postgresql.org/pgsql-admin/2007-04/msg00188.php
On the whole, you're not going to see a performance improvement
running tablespaces on NFS (unless the disk system on the NFS server
is a lot faster) since you have to go through the network as well as
NFS, both of which add overhead.
Usually, locking mechanisms on shared file systems don't play nice
with databases. You're better off using something else to load balance
or replicate data.
Peter
P.S. Why not just set up those servers you're planning on using as NFS
shares as your postgres server(s)?
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: pjkoczan@gmail.com, moreno_pg@mochima.com
Subject: Re: Tablespaces and NFS
In-Reply-To: <4544e0330709191454x2b125cc0j40c57977a0106cb4@mail.gmail.com>
References: <46F1471A.1010501@mochima.com> <4544e0330709191454x2b125cc0j40c57977a0106cb4@mail.gmail.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