Re: The shared buffers challenge - Mailing list pgsql-performance

From Greg Smith
Subject Re: The shared buffers challenge
Date
Msg-id 4DDFECD7.7090208@2ndquadrant.com
Whole thread Raw
In response to Re: The shared buffers challenge  (Scott Carey <scott@richrelevance.com>)
List pgsql-performance
Scott Carey wrote:
> And there is an OS component to it too.  You can actually get away with
> shared_buffers at 90% of RAM on Solaris.  Linux will explode if you try
> that (unless recent kernels have fixed its shared memory accounting).
>

You can use much larger values for shared_buffers on Solaris with UFS as
the filesystem than almost anywhere else, as you say.  UFS defaults to
caching an extremely tiny amount of memory by default.  Getting
PostgreSQL to buffer everything therefore leads to minimal
double-caching and little write caching that creates checkpoint spikes,
so 90% is not impossible there.

If you're using ZFS instead, that defaults to similar aggressive caching
as Linux.  You may even have to turn that down if you want the database
to have a large amount of memory for its own use even with normal levels
of sizing; just space for shared_buffers and work_mem can end up being
too large of a pair of competitors for caching RAM.  ZFS is not really
not tuned all that differently from how Linux approaches caching in that
regard.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: The shared buffers challenge
Next
From: Greg Smith
Date:
Subject: Re: The shared buffers challenge