[Beowulf] [OOM killer/scheduler] disabling swap on cluster nodes?

Andrew Shewmaker agshew at gmail.com
Mon Feb 9 11:59:10 PST 2015


On Mon, Feb 9, 2015 at 11:56 AM, Prentice Bisbal <
prentice.bisbal at rutgers.edu> wrote:

> To be clear setting vm.overcommit_memory doesn't directly affect the
> behavior of the OOM killer. Turning off overcommit prevents the  Linux
> virtual memory system from making promises it can't always keep, which
> reduces/eliminates the need for the OOM Killer.
>
> Setting vm.overcommit_memory = 2 turns off overcommitting and is the best
> choice if you want to avoid the OOM Killer.
>

​I recommend tuning vm.user_reserve_kbytes and admin_reserve_kbytes if you​
turn off overcommit and have no swap. The patch went in around 3.10

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c9b1d0981fcce3d9976d7b7a56e4e0503bc610dd

​It used to be hardcoded to 1/32nd reserves, which became impractical over
time.​

If I recall correctly, turning off overcommit doesn't totally prevent
overcommitment from happening. Available pages are checked on malloc, but
if a process never touches a page it mallocs, then it isn't subtracted out
of the available pages. So, if you want to be sure not to overcommit, make
sure apps use calloc, mlock, or walk over their pages as soon as possible.
Please correct me if I'm wrong on that.


-- 
Andrew Shewmaker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20150209/73a65939/attachment.html>


More information about the Beowulf mailing list