[Beowulf] [OOM killer/scheduler] disabling swap on cluster nodes?
hahn at mcmaster.ca
Mon Feb 9 22:12:06 PST 2015
> 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.
pretty much just the opposite, I'm afraid. vm.overcommit_memory=2
means that VM allocations will be counted at at brk/mmap time
against /proc/meminfo:CommitLimit. this is good, because it means
your allocation will fail, rather than some later time when you
touch pages within it.
in other words, the accounting is via VSZ, rather than RSS.
there were times in the past when vm.overcommit_memory=2 led to
oddities for programs that did SHM segments. these days, of course,
the memory cgroup controller generally does a better job than this.
(especially since it's pretty common for programs to have VSZ >> RSS
by a factor of 2-3, and not just transiently)
More information about the Beowulf