Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Date
Msg-id 14627.1378399734@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers  (Magnus Hagander <magnus@hagander.net>)
Responses Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Thu, Sep 5, 2013 at 3:01 AM, Bruce Momjian <bruce@momjian.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.

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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Where can I find the code for extern OidFunctionCall7?
Next
From: Robert Haas
Date:
Subject: Re: INSERT...ON DUPLICATE KEY IGNORE