Josh Berkus suggested here that work_mem and maintenance_work_mem could
be auto-tuned like effective_cache_size:
The attached patch implements this, closely matching the default values
for the default shared_buffers value:
test=> SHOW shared_buffers;
test=> SHOW work_mem;
test=> SHOW maintenance_work_mem;
Previous defaults were 1MB and 16MB, but the new defaults don't match
exactly because our max_connections is a power of 10 (100), not a power
of 2 (128). Of course, if shared_buffer is 10x larger, those defaults
become 10x larger.
FYI, I based maintenance_work_mem's default on shared_buffers, not on
work_mem because it was too complex to change maintenance_work_mem when
someone changes work_mem.
I will work on auto-tuning temp_buffers next. Any other suggestions?
wal_buffers is already auto-tuned.
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
+ Everyone has their own god. +
pgsql-hackers by date
|Next:||From: Andres Freund||Date: 2013-10-09 14:32:44|
|Subject: Re: Auto-tuning work_mem and maintenance_work_mem|
|Previous:||From: Pavel Stehule||Date: 2013-10-09 14:19:36|
|Subject: Re: WITHIN GROUP patch|