3 ms·
Protecting PostgreSQL from FreeBSD's OOM Killer
- CoolCold 2y ago> PostgreSQL can be protected against the OOM Killer in a more aggressive way with regard to Linux Is it? What's "more aggressive" comparing to setting needed OOMScoreAdjust= in unit file, like "OOMScoreAdjust=-1000" > Therefore, in order to protect the postmaster or any other PostgreSQL process, you need to manually use protect(1) as already shown. I am not sure if this is going to change in the future to allow the rc.d script to honor the oomprotect variable. When/if FreeBSD one day will get good service manager, like systemd, I guess.
- jiehong 2y agoInterestingly, if you use cgroups on Linux, you may also get killed by the OOM if you reach the max memory value[0]. In this case, it’s not to protect the kernel to panic. It could be interesting to start all applications with a default cgroup when the application is packaged in a distribution. [0]: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#memory-interface-files https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2...