Re: Getting out ahead of OOM

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting out ahead of OOM
Дата
Msg-id 1117736.1741375563@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting out ahead of OOM  (Joseph Hammerman <joe.hammerman@datadoghq.com>)
Ответы Re: Getting out ahead of OOM
Список pgsql-admin
Joseph Hammerman <joe.hammerman@datadoghq.com> writes:
> We run Postgres in a Kubernetes environment, and we have not to date been
> able to convince our Compute team to create a class of Kubernetes hosts
> that have memory overcommit disabled.

:-(

> Has anyone had success tracking all the Postgres memory allocation
> configurables and using that to administratively prevent OOMing?

I doubt anyone has tried that.  I would look into whether running
the postmaster under a suitable ulimit helps.  I seem to recall
discussions that in Linux, "ulimit -v" works better than the other
likely-looking options.  But that might be stale information.

> Alternatively, has anyone has success implementing an extension or periodic
> process to monitor the memory consumption of the Postgres children and
> killing them before the OOM event occurs?

That's not going to be noticeably nicer than the kernel-induced
OOM, I think.  The one thing it might do for you is ensure that
the kill happens to a child process and not the postmaster; but
you can already use PG_OOM_ADJUST_VALUE and PG_OOM_ADJUST_FILE
to manage that if it's a problem.  (Recent kernels are alleged
to usually do the right thing without that, though.)

            regards, tom lane



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