pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndquadrant.com>
To: Scott Carey <scott@richrelevance.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: The shared buffers challenge
Date: Fri, 27 May 2011 14:26:31 -0400
Message-ID: <4DDFECD7.7090208@2ndquadrant.com> (raw)
In-Reply-To: <CA051DED.39EC4%scott@richrelevance.com>
References: <CA051DED.39EC4%scott@richrelevance.com>

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




view thread (23+ messages)  latest in thread

Message-ID: <4DDFECD7.7090208@2ndquadrant.com>
Permalink:  ../4DDFECD7.7090208@2ndquadrant.com/
Also on:    postgresql.org/message-id/4DDFECD7.7090208@2ndquadrant.com

 · 

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: greg@2ndquadrant.com, scott@richrelevance.com, Kevin.Grittner@wicourts.gov, mmoncure@gmail.com
  Subject: Re: The shared buffers challenge
  In-Reply-To: <4DDFECD7.7090208@2ndquadrant.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