pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Michael van Rooyen <mvanr@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Kernel cache vs shared_buffers
Date: Sat, 12 May 2007 15:28:45 +0100
Message-ID: <4645CF1D.1030309@enterprisedb.com> (raw)
In-Reply-To: <00b301c79486$1c54da80$0200a8c0@saturn>
References: <00b301c79486$1c54da80$0200a8c0@saturn>

Michael van Rooyen wrote:
> I have no idea regarding the inner working of the pg's shared cache, but 
> what I would like to find out is whether it is table-row-based, or 
> disk-block-based.  

It's block based.

> 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.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (7+ messages)  latest in thread

Message-ID: <4645CF1D.1030309@enterprisedb.com>
Permalink:  ../4645CF1D.1030309@enterprisedb.com/
Also on:    postgresql.org/message-id/4645CF1D.1030309@enterprisedb.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: heikki@enterprisedb.com, mvanr@bigfoot.com
  Subject: Re: Kernel cache vs shared_buffers
  In-Reply-To: <4645CF1D.1030309@enterprisedb.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