Re: [LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
On Fri, Sep 16, 2016 at 3:13 PM, Martin Tippmann wrote: > opkg, luci works fine on LEDE with 32mb devices again. This seems to > be culprit, the kernel size increase is only ~100kb and I guess > negligible. Misread that, it's more like 800kb but still not a huge problem for now. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
On Thu, Sep 15, 2016 at 5:19 PM, Martin Tippmann wrote: > I have to do more testing through, this was just a quick look on a > CC15 Freifunk Router. Hi, Basti already send a patch and it looks like it's just this setting that causes problems: CC15.05.1 on 1043nd: root@openwrt:/tmp# cat /proc/meminfo MemTotal: 28580 kB MemFree:9784 kB MemAvailable: 15812 kB current LEDE with vm.min_free_kbytes: root@lede:~# cat /proc/meminfo MemTotal: 27828 kB MemFree:9788 kB MemAvailable: 7792 kB current LEDE without the vm.min_free_kbytes setting: root@lede:~# cat /proc/meminfo MemTotal: 27828 kB MemFree:9996 kB MemAvailable: 15636 kB opkg, luci works fine on LEDE with 32mb devices again. This seems to be culprit, the kernel size increase is only ~100kb and I guess negligible. regards Martin ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
* Jo-Philipp Wich [15.09.2016 16:58]: > http://git.lede-project.org/5c9cc7b7f8920944a413644e1c2ea23bfe655bcb ? indeed! this makes a huge difference on 32mb devices. so my proposal is: 1) dont touch vm.min_free_kbytes for 32mb-devices 2) when changing defaults with 'sysctl' dont be quiet, so the user has at least a chance to debug this. patch is on the way...bye, bastian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
* Jo-Philipp Wich [15.09.2016 16:58]: > can you check whether it is maybe caused by > > http://git.lede-project.org/5c9cc7b7f8920944a413644e1c2ea23bfe655bcb ? vm.min_free_kbytes really interesting, i have just overlooked this commit. for the record: with OpenWrt r49276 this value is 668 for a 32mb-device and on r43769 it is 466 on a 16mb device. i will make some test with changing this value on LEDE and report. bye, bastian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
On Thu, Sep 15, 2016 at 4:55 PM, Jo-Philipp Wich 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@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@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. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
Hi, can you check whether it is maybe caused by http://git.lede-project.org/5c9cc7b7f8920944a413644e1c2ea23bfe655bcb ? Its just a hunch. ~ Jo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] Memory Usage of LEDE trunk on devices with only 32mb memory.
Hi, I'm not sure if that's a bug or inevitable so I'd thought I'd ask here about the position from the LEDE devs/community. At the moment 32MB devices are pretty much unusable with LEDE and I'm not sure why. A 1043NDv1 on CC 15.05 has 15MB free memory: # cat /proc/meminfo MemTotal: 28740 kB MemFree:7292 kB MemAvailable: 15328 kB With LEDE trunk it's only a few megabytes MemAvailable. I've seen 3MB to 7MB but never more. So where are the additional 10-15MB usage are coming from? This causes quite a few problems at the moment: - opkg ist broken for these devices - the vfork patch caused problems and only did improve the problem for opkg update, opkg list / install etc.pp are still failing with out of memory error. - luci is broken, at least if using luci-mod-admin-full, any hit to the router website triggers an oom for me or times out. This is on the stock LEDE image, without additional packages (e.g. no vpn, olsr or batman).. Is this a kernel issue? Is 4.4 that much bigger? Or where some changes in defaults/buffers from 3.18 to 4.4 that caused the increased memory usage? Is 32mb device support something that's bug worthy or is the attitude: move on to 64mb devices? Additionally where can I look to improve the situation? Any hints for debugging memory issues in the kernel? regards & greetings from Weimar Martin ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev