Re: Unexplained rapid growth in memory usage of idle backends

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Unexplained rapid growth in memory usage of idle backends
Дата
Msg-id 346274191.318070.1683940657936@office.mailbox.org
обсуждение исходный текст
Ответ на Re: Unexplained rapid growth in memory usage of idle backends  (Alex Balashov <abalashov@evaristesys.com>)
Список pgsql-admin
> On 13/05/2023 01:56 CEST Alex Balashov <abalashov@evaristesys.com> wrote:
>
> > On May 12, 2023, at 7:38 PM, Erik Wienhold <ewie@ewie.name> wrote:
> >
> > Function pg_log_backend_memory_contexts(pid int) may give you some insights on
> > on the memory allocation for specific backends.
> >
> > https://www.postgresql.org/docs/14/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL-TABLE
>
> Ah, thanks!
>
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 3; CachedPlanQuery: 2048 total in 2 blocks; 552 free
(0chunks); 1496 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 2; SPI Plan: 1024 total in 1 blocks; 600 free (0
chunks);424 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; 828 more child contexts containing 2714624 total in
2097blocks; 899280 free (329 chunks); 1815344 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; WAL record construction: 49768 total in 2 blocks;
6360free (0 chunks); 43408 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; PrivateRefCount: 8192 total in 1 blocks; 2616 free
(0chunks); 5576 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; MdSmgr: 8192 total in 1 blocks; 5640 free (1
chunks);2552 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; LOCALLOCK hash: 16384 total in 2 blocks; 4592 free
(2chunks); 11792 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; Timezones: 104120 total in 2 blocks; 2616 free (0
chunks);101504 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  level: 1; ErrorContext: 8192 total in 1 blocks; 7928 free (5
chunks);264 used
 
> 2023-05-12 23:53:23.293 UTC [3934125] eti_adm@eti LOG:  Grand total: 6417232 bytes in 2461 blocks; 2409920 free (468
chunks);4007312 used
 
>
> But what can I learn from this that might be of applied value?

Narrowing down the memory contexts with high allocation.  But I haven't used
this function before and would have to look up the memory context names.
I bet there are plenty of people on this list who can interpret the output.

But the log messages that you posted are not the entire output.  The first line
should read "logging memory context if PID".

--
Erik



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

Предыдущее
От: Alex Balashov
Дата:
Сообщение: Re: Unexplained rapid growth in memory usage of idle backends
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: pgsql code is not working.