Thread: A question on EFFECTIVE_CACHE_SIZE

A question on EFFECTIVE_CACHE_SIZE

From
"Steve Wolfe"
Date:
   The docs list EFFECTIVE_CACHE_SIZE as being a run-time parameter with
the postmaster's assumptions about the kernel disk cache size.  Is that
something that is determined by querying the kernel, or by other means?
If it is determined in a less-than-precise manner, will setting it to a
more precise value benefit much?

steve



Re: A question on EFFECTIVE_CACHE_SIZE

From
Tom Lane
Date:
"Steve Wolfe" <steve@iboats.com> writes:
>    The docs list EFFECTIVE_CACHE_SIZE as being a run-time parameter with
> the postmaster's assumptions about the kernel disk cache size.  Is that
> something that is determined by querying the kernel, or by other means?

It's just a constant by default.  Even if there were a portable way to
query the kernel about how much memory there is, by what factor should
we reduce the result to allow for other applications?  There's really
no way I can see to get a useful number automatically.  This of course
begs the question whether the estimates derived using this number mean
much of anything :-(

> If it is determined in a less-than-precise manner, will setting it to a
> more precise value benefit much?

Probably not, but feel free to experiment and report back.  I'd suggest
doing the experiments with current sources, since the cost estimation
code has changed noticeably since 7.1.

            regards, tom lane