Записки оптимизатора 1С (ч.17). Как избежать падения Postgres при большом потреблении памяти запросами

Рассмотрим одну из старых проблем со стабильностью работы Postgres – отсутствие полного контроля за потреблением оперативной памяти при выполнении запросов. В ряде случаев это приводит либо к свопированию, либо к падению СУБД и остановке работы информационной системы. Происходит это неожиданно, без предупреждения и в не самый удачный момент. В системах 1С эта проблема точно существует, встречали не раз. Вроде бы на помощь должна прийти технология OOM Killer Linux, но, как обычно, не все так радужно и есть неприятные нюансы.

https://habr.com/ru/companies/softpoint/articles/1041984/

#postgres #postgresql #падение_postgres #нехватка_памяти_postgres #oom_killer #work_mem #perfexpert #overcommit #overcommit_memory

Записки оптимизатора 1С (ч.17). Как избежать падения Postgres при большом потреблении памяти запросами

Речь пойдет об одной из старых проблем со стабильностью работы Postgres – об отсутствии полного контроля за потреблением оперативной памяти при выполнении запросов (через work_mem), что в ряде случаев...

Хабр

3/3

Esto del #overcommit es un tema complicado como para explicarlo en este hilo... si les interesa también podemos ampliar en otra oportunidad, sólo tienen que decirme 💬 😉

Las otras dos opciones de la poll son incorrectas porque no existen en el sistema (creo 😜).

Espero que sume a aprender un poquito más sobre Linux!  

Cualquier duda o sugerencia me comentan! 👇

#gnu #linux #AprenderLinux #aprender_linux #learnlinux #juncotic

@Jeff swap is really useful because most programs are requesting RAM they don't really need and when you're using "all" your RAM, its nice to have the unnecessary bits in swap and leave RAM free for active use.
Swap is also used for hibernation.
There's a point at which you may have enough RAM to not care, but even with 48GiB, my system often has quite a bit swapped out because Chrome.
#Linux #RAM #Swap #overcommit

This keeps tripping up new developers (if they ever become aware of it at all):

“In C, How Do You Know If The Dynamic Allocation Succeeded?”, Daniel Lemire (https://lemire.me/blog/2021/10/27/in-c-how-do-you-know-if-the-dynamic-allocation-succeeded/).

On HN: https://news.ycombinator.com/item?id=29123678

PS: Not specific to C.

#VirtualMemory #Memory #OS #OverCommit

In C, how do you know if the dynamic allocation succeeded?

In the C programming language, we allocate memory dynamically (on the heap) using the malloc function. You pass malloc a size parameter corresponding to the number of bytes you need. The function returns either a pointer to the allocated memory or the NULL pointer if the memory could not be allocated. Or so you may … Continue reading In C, how do you know if the dynamic allocation succeeded?

Daniel Lemire's blog