Re: NFS, file system cache and shared_buffers

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: NFS, file system cache and shared_buffers
Date: 2014-05-27 14:40:13
Message-ID: 20140527144013.GL2556@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

* Heikki Linnakangas (hlinnakangas(at)vmware(dot)com) wrote:
> On 05/27/2014 02:06 PM, Albe Laurenz wrote:
> >I just learned that NFS does not use a file system cache on the client side.
> >
> >On the other hand, PostgreSQL relies on the file system cache for performance,
> >because beyond a certain amount of shared_buffers performance will suffer.
> >
> >Together these things seem to indicate that you cannot get good performance
> >with a large database over NFS since you can leverage memory speed.
> >
> >Now I wonder if there are any remedies (CacheFS?) and what experiences
> >people have made with the performance of large databases over NFS.
>
> I have no personal experience with NFS, but sounds like a
> higher-than-usual shared_buffers value would be good.

It would certainly be worthwhile to test it. In the end you would,
hopefully, end up with a situation where you're maximizing RAM usage-
the NFS server is certainly caching in *its* filesystem cache, while on
the PG server you're getting the benefit of shared_buffers without the
drawback of double-buffering (since you couldn't ever use the NFS
server's memory for shared_buffers anyway).

All that said, there has always been a recommendation of caution around
using NFS as a backing store for PG, or any RDBMS..

Thanks,

Stephen

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Albe Laurenz 2014-05-27 15:00:01 Re: NFS, file system cache and shared_buffers
Previous Message Heikki Linnakangas 2014-05-27 12:26:56 Re: NFS, file system cache and shared_buffers