[OpenWrt-Devel] overcommit memory/ratio
Karl P
karlp at tweak.net.au
Tue Sep 16 18:29:58 EDT 2014
Alternatively, if you know which process it is, set it's oom_adj_score so that
it gets killed first. Some other people are kinda used to things behaving as
they are, for better or worse. (Turning off overcommit on an openwrt device is
no different than turning off overcommit on a desktop as far as I'm concerned.
Somethings will be better, lots of things less so)
Cheers,
Karl P
On 09/15/2014 07:22 PM, Nikos Mavrogiannopoulos wrote:
> 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
>
_______________________________________________
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