On Mon, Feb 9, 2015 at 11:56 AM, Prentice Bisbal < [email protected]> 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
_______________________________________________ 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
