Re: Make MemoryContextMemAllocated() more precise - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Make MemoryContextMemAllocated() more precise
Date
Msg-id CA+TgmoYqN+zFW_ZBUDtccR3d=9bEjNe9uU_o+srU38+uJ_+O6A@mail.gmail.com
Whole thread Raw
In response to Re: Make MemoryContextMemAllocated() more precise  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Make MemoryContextMemAllocated() more precise  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Thu, Mar 19, 2020 at 3:27 PM Jeff Davis <pgsql@j-davis.com> wrote:
> I think omitting the tail of the current block is an unqualified
> improvement for the purpose of obeying work_mem, regardless of the OS.
> The block sizes keep doubling up to 8MB, and it doesn't make a lot of
> sense to count that last large mostly-empty block against work_mem.

Well, again, my point is that whether or not it counts depends on your
system's overcommit behavior. Depending on how you have the
configured, or what your OS likes to do, it may in reality count or
not count. Or so I believe. Am I wrong?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: GSoC applicant proposal, Uday PB
Next
From: Tomas Vondra
Date:
Subject: Re: Make MemoryContextMemAllocated() more precise