A question on EFFECTIVE_CACHE_SIZE

Started by Steve Wolfealmost 25 years ago2 messagesgeneral
Jump to latest
#1Steve Wolfe
steve@iboats.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Steve Wolfe (#1)
Re: A question on EFFECTIVE_CACHE_SIZE

"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