Re: Add tracking of backend memory allocated to pg_stat_activity

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Add tracking of backend memory allocated to pg_stat_activity
Дата
Msg-id 20221206175544.j5xwi5po3qpzg2jw@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Add tracking of backend memory allocated to pg_stat_activity  (Reid Thompson <reid.thompson@crunchydata.com>)
Список pgsql-hackers
Hi,

On 2022-12-06 08:47:55 -0500, Reid Thompson wrote:
> The intent was to capture and display all the memory allocated to the
> backends, for admins/users/max_total_backend_memory/others to utilize.

It's going to be far less accurate than that. For one, there's a lot of
operating system resources, like the page table, that are going to be
ignored. We're also not going to capture allocations done directly via
malloc(). There's also copy-on-write effects that we're ignoring.

If we just want to show an accurate picture of the current memory usage, we
need to go to operating system specific interfaces.


> Why should we ignore the allocations prior to backend_status.c?

It seems to add complexity without a real increase in accuracy to me. But I'm
not going to push harder on it than I already have.

Greetings,

Andres Freund



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Error-safe user functions
Следующее
От: Brar Piening
Дата:
Сообщение: Re: doc: add missing "id" attributes to extension packaging page