From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers |
Date: | 2013-09-05 21:16:22 |
Message-ID: | 20130905211622.GC27195@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 5, 2013 at 12:48:54PM -0400, Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > On Thu, Sep 5, 2013 at 3:01 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >> I have developed the attached patch which implements an auto-tuned
> >> effective_cache_size which is 4x the size of shared buffers. I had to
> >> set effective_cache_size to its old 128MB default so the EXPLAIN
> >> regression tests would pass unchanged.
>
> > That's not really autotuning though. ISTM that making the *default* 4
> > x shared_buffers might make perfect sense, but do we really need to
> > hijack the value of "-1" for that? That might be useful for some time
> > when we have actual autotuning, that somehow inspects the system and
> > tunes it from there.
>
> Well, the real problem with this patch is that it documents what the
> auto-tuning algorithm is; without that commitment, just saying "-1 means
> autotune" might be fine.
OK, but I did this based on wal_buffers, which has a -1 default, calls
it auto-tuning, and explains how the default is computed.
> Did you consider the alternative of just tweaking initdb to insert a
> default for effective_cache_size that's 4x whatever it picks for
> shared_buffers? That would probably be about 3 lines of code, and it
> wouldn't nail down any particular server-side behavior.
The problem there is that many users are told to tune shared_buffers,
but don't touch effective cache size. Having initdb set the
effective_cache_size value would not help there. Again, this is all
based on the auto-tuning of wal_buffers.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2013-09-05 21:24:10 | Re: 9.4 regression |
Previous Message | Bruce Momjian | 2013-09-05 21:14:37 | Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers |