tmpfs and the OOM killer
Quoted 9 lines · Pedro
Quoted 6 lines · Willy Tarreau
Quoted 2 lines · Pedro
As the OOM killer is not Posix,
If you cannot control your application's memory usage, you'll have to finely tune the
overcommit_ratio.2) How should an application be written to not be killed by OOM?
Try this:
# echo -17 > /proc/<pid>/oom_adj
Or this:
# echo 2 > /proc/sys/vm/overcommit_memory # echo 95 > /proc/sys/vm/overcommit_ratio
Or this:
# ulimit -v [max vm]
Thanks, and good luck with the OOM killer!
--
Al
Quoted 6 lines · Al Boldi
Quoted 2 lines
Pedro wrote:
2) How should an application be written to not be killed by OOM?Try this:
# echo -17 > /proc/<pid>/oom_adj
I should know that to run a fail-safe application is a superuser privilege.
Sorry from wasting your time.