[LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.

Martin Tippmann mt at i3o.de
Thu Sep 15 08:19:30 PDT 2016


On Thu, Sep 15, 2016 at 4:55 PM, Jo-Philipp Wich <jo at mein.io> wrote:
>
> Hi,
>
> can you check whether it is maybe caused by
>
>   http://git.lede-project.org/5c9cc7b7f8920944a413644e1c2ea23bfe655bcb ?
>
>
> Its just a hunch.

Could be part of the problem, it looks like memory reserved by
vm.min_free_kbytes can not be used from userspace. In CC15 it's only
681kb. The official docs say anything below 1024kb will be a
problem[1]

# sysctl -w vm.min_free_kbytes=681
vm.min_free_kbytes = 681
root at zoellnerzwo:~ cat /proc/meminfo | grep ^Mem
MemTotal:          29220 kB
MemFree:            6116 kB
MemAvailable:       9320 kB

# sysctl -w vm.min_free_kbytes=4096
vm.min_free_kbytes = 4096
root at zoellnerzwo:~ cat /proc/meminfo | grep ^Mem
MemTotal:          29220 kB
MemFree:            6128 kB
MemAvailable:       3676 kB

Also the difference in MemAvailable (5644) appers to be bigger than
the difference in values (3415).

If only the value from MemAvailable is usable from userspace that
could be the issue.

I have to do more testing through, this was just a quick look on a
CC15 Freifunk Router.

regards
Martin


1: https://www.kernel.org/doc/Documentation/sysctl/vm.txt

Some minimal amount of memory is needed to satisfy PF_MEMALLOC
allocations; if you set this to lower than 1024KB, your system will
become subtly broken, and prone to deadlock under high loads.



More information about the Lede-dev mailing list