Re: Auto-tuning work_mem and maintenance_work_mem
От | Pavel Stehule |
---|---|
Тема | Re: Auto-tuning work_mem and maintenance_work_mem |
Дата | |
Msg-id | CAFj8pRDEpm9UwRvOSOnNSsfYgbTJOSyWdBkq3961U2huDtiqNw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Auto-tuning work_mem and maintenance_work_mem (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: Auto-tuning work_mem and maintenance_work_mem
|
Список | pgsql-hackers |
2013/10/9 Bruce Momjian <bruce@momjian.us>
On Wed, Oct 9, 2013 at 04:32:44PM +0200, Andres Freund wrote:Well, that is true, but the more shared_buffers you allocate, the more
> On 2013-10-09 10:30:46 -0400, Bruce Momjian wrote:
> > Josh Berkus suggested here that work_mem and maintenance_work_mem could
> > be auto-tuned like effective_cache_size:
> >
> > http://www.postgresql.org/message-id/50ECCF93.3060101@agliodbs.com
> >
> > The attached patch implements this, closely matching the default values
> > for the default shared_buffers value:
>
> There imo is no correlation between correct values for shared_buffers
> and work_mem at all. They really are much more workload dependant than
> anything.
work_mem you _probably_ want to use. This is only a change of the
default.
Effectively, if every session uses one full work_mem, you end up with
total work_mem usage equal to shared_buffers.
We can try a different algorithm to scale up work_mem, but it seems wise
to auto-scale it up to some extent based on shared_buffers.
In my experience a optimal value of work_mem depends on data and load, so I prefer a work_mem as independent parameter.
maintenance_work_mem can depend on work_mem ~ work_mem * 1 * max_connection / 4
Regards
Pavel
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: