Re: Limiting memory allocation

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

Yes.

The main and foremost problem is a server that is used for multiple 
services and they behave differently when it comes to memory allocation. 
One service just allocates like we have petabytes of RAM, then uses 
little of it, while another one is doing precise accounting and uses all 
of that. These two types of services don't coexist well on one system 
without intervention.

Unfortunately swap space has been shunned as the ugly stepchild of 
memory in recent years. It could help in this regard to bring back swap 
space, but don't really intend to use it.

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. So I have a server with 64G of RAM. I give 16G 
to Postgres as shared buffers and another 16G to work with. I assume 
another 16G of OS buffers, so I restrict the Apache-Tomcat stuff running 
on it to something like 8-12G. After that, it has to swap. Of course, my 
Postgres processes also will have to swap if they need more than 16G of 
overall workmem ... but that is what I actually intended. I may have to 
reduce workmem, or max_connections, or something else.


Regards, Jan



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

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