From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron Mayer <rm_pg@cheapcomplexdevices.com>
Cc: Manfred Koizar <mkoi-pg@aon.at>
Cc: Pallav Kalva <pkalva@deg.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: Setting Shared Buffers , Effective Cache, Sort Mem
Date: Fri, 23 Apr 2004 22:50:14 -0400
Message-ID: <6798.1082775014@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.58.0404231506310.5473@one>
References: <4088062E.2050901@deg.cc>
<ubig80lo5itco1o393hlu43ijsqppskgbr@email.aon.at>
<4089261A.9070700@deg.cc>
<kt1j805pi254lk614038qaq92c7qs64egv@email.aon.at>
<Pine.LNX.4.58.0404231506310.5473@one>
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:
> [ on setting shared_buffers = half of RAM ]
> One minor detail... You wouldn't really cache the _exact_ same blocks
> because cache-hits in shared-buffers (on the most frequently accessed
> pages) would let the OS cache some other pages in it's cache.
> But in my experience Manfred's right that there's no benefit and
> some penalty to making shared_buffers so large it takes a significant
> piece away from the OS's caching.
True, it'd probably not be the *exact* worst case. But it'd be a good
approximation. In practice you should either bet on the kernel doing
most of the caching (in which case you set shared_buffers pretty low)
or bet on Postgres doing most of the caching (in which case you set
shared_buffers to eat most of RAM).
The conventional wisdom at this point is to bet the first way; no one
has shown performance benefits from setting shared_buffers higher than
the low tens of thousands. (Most of the mail list traffic on this
predates the existence of pgsql-performance, so check the other list
archives too if you go looking for discussion.)
It's possible that Jan's recent buffer-management improvements will
change the story as of 7.5. I kinda doubt it myself, but it'd be worth
re-running any experiments you've done when you start working with 7.5.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, rm_pg@cheapcomplexdevices.com, mkoi-pg@aon.at, pkalva@deg.cc
Subject: Re: Setting Shared Buffers , Effective Cache, Sort Mem
In-Reply-To: <6798.1082775014@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox