Re: work_mem

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, MichaelDBA <MichaelDBA(at)sqlexec(dot)com>, SASIKUMAR Devaraj <sashikumard(at)yahoo(dot)com>, "holger(at)jakobs(dot)com" <holger(at)jakobs(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: work_mem
Date: 2021-04-02 15:34:36
Message-ID: 20210402153436.GE9270@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Apr 2, 2021 at 03:25:04PM +0000, Campbell, Lance wrote:
> Thanks for sharing this thread. My suggestion of having a work_mem_stack_size
> is the same concept mentioned in this thread regarding having a work_mem_pool.
> I prefer this later term rather than the one I was using. When the work mem
> pool is exhausted PostgreSQL just uses temp files for work_mem. With current
> statics for temp files and with a new stats on a work mem pool usage a user
> could fine tune memory much more precisely. It would leave the “art of memory
> tuning” behind. The other added benefit is that people would have a better
> understanding of how work_mem is used by naturally having to explain what a
> work_mem_pool is and when it is drawn on. There are probably a lot of
> PostgreSQL instance that would run faster just by having the confidence to
> increase the size of work_mem. I am sure many instances have this value set to
> low.

Uh, did you read the blog before it, referenced in that blog entry:

https://momjian.us/main/blogs/pgblog/2018.html#December_7_2018

Even if we have a pool, it is still complex to configure memory, but it
might help.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

If only the physical world exists, free will is an illusion.

In response to

Responses

  • Re: work_mem at 2021-04-03 05:23:56 from SASIKUMAR Devaraj

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2021-04-02 22:35:01 Global memory or local memory? (was Re: work_mem)
Previous Message Campbell, Lance 2021-04-02 15:25:04 Re: work_mem