Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Дата
Msg-id 20130905211622.GC27195@momjian.us
обсуждение исходный текст
Ответ на Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Sep  5, 2013 at 12:48:54PM -0400, Tom Lane wrote:
> 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.

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@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 9.4 regression