1

What would be a good alternative whole-system-crash prevention method? Preferably not based on maximum (per-terminal) memory allocation limits but the other way around: some way to reserve enough memory for system (critical) processes (a few whitelisted processes). Or simply (put) some way to block running new processes when the system reaches some limit. Or at least some monitoring application with notifications/warnings.

  • 1
    Not exactly what you're asking for here but in limited environments tuning the /proc/sys/vm/overcommit_memory setting can be a last-resort effort to have some applications crash less or at least later. – phk Jan 8 '17 at 12:06
0

One option might be to adjust the value of /proc/<pid>/oom_score_adj to prevent the oom killer to kill the process in case of low memory situation. Setting the value to -1000 will prevent the kernel to kill the process completely.

  • I changed "crash" to "whole-system-crash". I hope this made my question clearer. – glarry Feb 10 '17 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.