Re: Make MemoryContextMemAllocated() more precise

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
Subject: Re: Make MemoryContextMemAllocated() more precise
Date: 2020-03-19 19:33:26
Message-ID: CA+TgmoYqN+zFW_ZBUDtccR3d=9bEjNe9uU_o+srU38+uJ_+O6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 19, 2020 at 3:27 PM Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2020-03-19 19:37:34 Re: Make MemoryContextMemAllocated() more precise
Previous Message Stephen Frost 2020-03-19 19:31:18 Re: GSoC applicant proposal, Uday PB