Protecting PostgreSQL from FreeBSD's OOM Killer
fluca1978.github.io
fluca1978.github.io
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.
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...