Re: Built-in support for a memory consumption ulimit?
От | Amit Kapila |
---|---|
Тема | Re: Built-in support for a memory consumption ulimit? |
Дата | |
Msg-id | CAA4eK1LC2tc5e0adeFt0g4Bd42wAO=AhMgiCJvEys0d33Q3TuA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Built-in support for a memory consumption ulimit? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Built-in support for a memory consumption ulimit?
|
Список | pgsql-hackers |
On Wed, Jun 18, 2014 at 2:09 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Robert Haas <robertmhaas@gmail.com> writes:
> > We could do better by accounting for memory usage ourselves, inside
> > the memory-context system, but that'd probably impose some overhead we
> > don't have today.
>
> Hm. We could minimize the overhead if we just accounted for entire
> malloc chunks and not individual palloc allocations. That would make
> the overhead not zero, but yet probably small enough to ignore.
>
> On the other hand, this approach would entirely fail to account for
> non-palloc'd allocations, which could be a significant issue in some
> contexts.
Won't it be possible if we convert malloc calls in backend code to
>
> Robert Haas <robertmhaas@gmail.com> writes:
> > We could do better by accounting for memory usage ourselves, inside
> > the memory-context system, but that'd probably impose some overhead we
> > don't have today.
>
> Hm. We could minimize the overhead if we just accounted for entire
> malloc chunks and not individual palloc allocations. That would make
> the overhead not zero, but yet probably small enough to ignore.
>
> On the other hand, this approach would entirely fail to account for
> non-palloc'd allocations, which could be a significant issue in some
> contexts.
Won't it be possible if we convert malloc calls in backend code to
go through wrapper, we already have some precedents of same like
В списке pgsql-hackers по дате отправления: