Re: Limiting memory allocation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Limiting memory allocation
Дата
Msg-id 1629012.1652825511@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Limiting memory allocation  (Jan Wieck <jan@wi3ck.info>)
Ответы Re: Limiting memory allocation  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Jan Wieck <jan@wi3ck.info> writes:
> On 5/17/22 15:42, Stephen Frost wrote:
>> Thoughts?

> Using cgroups one can actually force a certain process (or user, or 
> service) to use swap if and when that service is using more memory than 
> it was "expected" to use.

I wonder if we shouldn't just provide documentation pointing to OS-level
facilities like that one.  The kernel has a pretty trivial way to check
the total memory used by a process.  We don't: it'd require tracking total
space used in all our memory contexts, and then extracting some number out
of our rear ends for allocations made directly from malloc.  In short,
anything we do here will be slow and unreliable, unless you want to depend
on platform-specific things like looking at /proc/self/maps.

ulimit might be interesting to check into as well.  The last time I
looked, it wasn't too helpful for this on Linux, but that was years ago.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Zstandard support for toast compression
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Limiting memory allocation