Re: Using a lot of memory in each session.

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Using a lot of memory in each session.
Дата
Msg-id 5f727153d2593bcd0454d4897eb387da60c90c94.camel@cybertec.at
обсуждение исходный текст
Список pgsql-bugs
On Tue, 2024-09-24 at 16:58 +0900, DBA wrote:
> We set shared_buffer = 70GB, max_connections = 300, work_mem = 300MB.
>
> We thought the session memory could be adjusted with the work_mem variable, but no.
> noticed that each session consumed more than 500MB.

work_mem limits the memory used by a single execution plan step, so a single
backend can use way more memory.
Moreover, there is hash_mem_multiplier, which defaults to 2 in v15, so a
hash may use twice as much memory.

You didn't tell us how much RAM you have, but your setting of shared_buffers
is probably too high, and you most likely should also reduce work_mem,
particularly if you allow hundreds of connections.

Anyway, I see no bug here.

Yours,
Laurenz Albe



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