Re: Effective Cache Size

От: Shridhar Daithankar
Тема: Re: Effective Cache Size
Дата: ,
Msg-id: 3F01E1E1.16493.F1FF6A@localhost
(см: обсуждение, исходный текст)
Ответ на: Effective Cache Size  (Howard Oblowitz)
Список: pgsql-performance

Скрыть дерево обсуждения

Effective Cache Size  (Howard Oblowitz, )
 Re: Effective Cache Size  ("scott.marlowe", )
 Re: Effective Cache Size  (Manfred Koizar, )
 Re: Effective Cache Size  ("Shridhar Daithankar", )

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.



В списке pgsql-performance по дате сообщения:

От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Version 7 question
От: "Michael Mattox"
Дата:
Сообщение: Re: How to optimize monstrous query, sorts instead of