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)
_______________________________________________
Beowulf mailing list, [email protected] sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf

Reply via email to