Thursday, May 29, 2008

Re: [HACKERS] [PERFORM] Memory question on win32 systems

On Thu, May 29, 2008 at 10:19 AM, Justin <justin@emproshunts.com> wrote:
> To my understanding Postgresql only caches queries and results in memory for
> that specific connection. So when that connection is closed those cached
> results are cleared out. So cached indexs and queries are for that
> connection only. I hope my understanding is correct.

completely wrong.

They are called 'shared' buffers for a reason. Also you are missing
the point of the o/s file cache which lies under that. If you have a
computer with 4gb ram that is addressable, all its memory is used for
caching at all times, period, less what operating system needs or what
is used by running programs or temporary demands (sorting, etc).

Also, postgresql doesn't as a rule cache 'results and queries'.

shared buffers setting reserves memory for postgresql's internal cache
(plus some housekeeping things like locks)...which can be faster than
the o/s cache because it is more tightly integrated with the backend.
However a page fault to disk is much more interesting in performance
terms than the performance differences between shared buffers and o/s
cache.

merlin

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: