pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jim@nasby.net>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Michael van Rooyen <mvanr@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Kernel cache vs shared_buffers
Date: Sat, 12 May 2007 11:55:41 -0500
Message-ID: <20070512165540.GD52939@nasby.net> (raw)
In-Reply-To: <4645CF1D.1030309@enterprisedb.com>
References: <00b301c79486$1c54da80$0200a8c0@saturn>
	<4645CF1D.1030309@enterprisedb.com>

On Sat, May 12, 2007 at 03:28:45PM +0100, Heikki Linnakangas wrote:
> >In the case of it being disk-block based, my 
> >inclination would be to let the kernel do the buffering.  In the case of 
> >the cache being table-row-based, I would expect it to be much more 
> >space-efficient and I would be inclined to give the memory to the pg.  
> >In that case, is it feasible to set shared_buffers to something like 
> >500000 x 8k blocks?  We make extensive use of indexes on the larger 
> >tables and would seldom, if ever, do sequential scans.
> 
> A common rule of thumb people quote here is to set shared_buffers to 1/4 
> of available RAM, and leave the rest for OS cache. That's probably a 
> good configuration to start with.

If you really care about performance it would be a good idea to start
with that and do your own benchmarking. Much of the consensus about
shared_buffers was built up before 8.0, and the shared buffer management
we have today looks nothing like what was in 7.4. You might find that
shared_buffers = 50% of memory or even higher might perform better for
your workload.

If you do find results like that, please share them. :)
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



view thread (7+ messages)  latest in thread

Message-ID: <20070512165540.GD52939@nasby.net>
Permalink:  ../20070512165540.GD52939@nasby.net/
Also on:    postgresql.org/message-id/20070512165540.GD52939@nasby.net

 · 

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: jim@nasby.net, heikki@enterprisedb.com, mvanr@bigfoot.com
  Subject: Re: Kernel cache vs shared_buffers
  In-Reply-To: <20070512165540.GD52939@nasby.net>

* 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