[OpenWrt-Devel] overcommit memory/ratio

Nikos Mavrogiannopoulos nmav at gnutls.org
Mon Sep 15 15:22:59 EDT 2014


Hello,
 It seems I have a memory leak in a process that runs under openwrt, and
occasionally the watchdog process is being killed by the oom-killer
causing a reboot. Seen that, I think that having the default overcommit
settings of the linux kernel is quite an overkill for a system like
openwrt where memory is really limited. May I suggest turning off
overcommit completely in openwrt using:
echo 2 > /proc/sys/vm/overcommit_memory       
echo 100 >/proc/sys/vm/overcommit_ratio     

somewhere in the init scripts. That way processes which have a leak will
eventually get a NULL pointer in malloc() and the oom-killer wouldn't
kill unrelated processes.

regards,
Nikos

[0].
http://serverfault.com/questions/362589/effects-of-configuring-vm-overcommit-memory
[1]. http://www.win.tue.nl/~aeb/linux/lk/lk-9.html
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list