pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: pgsql-performance@postgresql.org
Subject: Re: Effective Cache Size
Date: Tue, 01 Jul 2003 19:32:49 +0530
Message-ID: <3F01E1E1.16493.F1FF6A@localhost> (raw)
In-Reply-To: <EFF9ABB64B24D511A75C0002A5512D5C01A03AC3@LEWEXCH>

On 1 Jul 2003 at 15:50, Howard Oblowitz wrote:

> The documentation says that Effective Cache Size "sets the optimizer's
> assumption
> about the effective size of the disk cache ( that is, the portion of the
> kernel's disk 
> cache that will be used for PostgreSQL data files ).
> 
> What then will be the effect of setting this too high?
> 
> And too low?

Let's say postgresql is preparing a plan for a scan and it estimates data set 
size as 100MB whereas your shared buffers+effective cache is 80M. So postgresql 
would deduce that it would be better off with sequential scan rather than index 
scan. Where in fact you have much more memory to make a file system cache and 
the machine can afford index scan.

There is nothing too low or too high of a setting. This isn't exactly 
performance tuning paramter as other. This is more of information to 
postgresql. The closer it gets to truer, the plans produced would get optimal.

About how to set this parameter, it is roughly

effective cache size= (Physical RAM size-shared buffers-requirement for other 
apps) * 0.8

This is very very rough. You need to make sure that some setting does not 
trigger a swap avelanche

HTH

Bye
 Shridhar

--
Slous' Contention:	If you do a job too well, you'll get stuck with it.




view thread (6+ messages)  latest in thread

Message-ID: <3F01E1E1.16493.F1FF6A@localhost>
Permalink:  ../3F01E1E1.16493.F1FF6A@localhost/
Also on:    postgresql.org/message-id/3F01E1E1.16493.F1FF6A@localhost

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: shridhar_daithankar@persistent.co.in
  Subject: Re: Effective Cache Size
  In-Reply-To: <3F01E1E1.16493.F1FF6A@localhost>
  References: <EFF9ABB64B24D511A75C0002A5512D5C01A03AC3@LEWEXCH> <3F01E1E1.16493.F1FF6A@localhost>

* 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