From: | "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Effective Cache Size |
Date: | 2003-07-01 14:02:49 |
Message-ID: | 3F01E1E1.16493.F1FF6A@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-07-01 14:18:34 | Re: Effective Cache Size |
Previous Message | Michael Mattox | 2003-07-01 13:55:22 | Re: Version 7 question |