Just following up on the suspected memory leak, and image build sizes.

With the memory leak, it's not a memory leak as such rather than conntrackd filling things up with a log file.

After 22 hours of running:

root@gateway-openwrt:/tmp/log# ls -l
-rw------- 1 root root 30080612 Aug 28 08:44 conntrackd-stats.log
drwxr-xr-x    2 root     root            60 Aug 27 10:37 ddns
-rw-r--r--    1 root     root             0 Aug 25 13:06 lastlog
-rw-r--r--    1 root     root             0 Aug 27 10:36 log.nmbd
-rw-r--r--    1 root     root             0 Aug 27 10:36 log.smbd
-rw-r--r--    1 root     root             0 Aug 25 13:06 wtmp

Deleting the log file and then shutting down conntrackd cleared the used space. I might look at omitting conntrackd from the builds in future.

Now for the build sizes.

musl does produce a larger image. Below is the result of a configuration file I have used for trunk builds with releases 457xx and have reused for a build on r46734 the only changes being I selected either uclibc or musl for the toolchain, otherwise the config file used is identical.

MUSL:

-rw-r--r-- 1 adamk adamk 8126468 Aug 27 23:15 openwrt-ar71xx-generic-wndr3800-squashfs-sysupgrade.bin

UCLIBC:

-rw-r--r-- 1 adamk adamk 7864324 Aug 27 14:19 openwrt-ar71xx-generic-wndr3800-squashfs-sysupgrade.bin


Now, for stability sakes I'll want to reduce the image size anyway, with the bloat from latest kernels blowing things out by a good 300KB as well, but it looks like using musl adds around 300KB too.

Have the devs determined that perhaps the increased performance of using musl outweighs the hit on image sizes?

Cheers
Adam


On 27/08/15 22:17, Adam Kuklycz wrote:
Hi Felix

Thanks for clarifying. I've also noticed what appears to be a memory leak in my latest build as well which I am working on drilling down now. After a couple days of uptime the device is out of memory. It's much more pronounced when doing downloads with many connections simultaneously.

So all that said, yes I do agree there is always more bloat with each kernel update sadly. I'm busy now doing builds with both uclibc and musl and will be interested to see the size comparisons. Will take several hours so will report back in the morning (Australian time)

Cheers


On 27/08/15 19:33, Felix Fietkau wrote:
On 2015-08-27 01:48, Adam Kuklycz wrote:
Hi all,

I was wondering why OpenWRT switched to musl -- is it purely because
uclibc hasn't actually maintained their code properly?
That's only part of the reason. Aside from the maintainenance, the code
quality of uClibc is also poor compared to musl.
musl also has better runtime performance and uses less RAM.

One of the things I have noticed since the CC trunk builds I did with
kernel 3.18.11 + uclibc is that the image sizes have ballooned out by a
fair bit.

For example, a build on trunk r45705 which uses uclibc and kernel
3.18.11 would allow for most features to be included in a build e.g.
openvpn, luci + ssl support, more connecting protocols than just pppoe
and so on with a router sporting 8MB of flash.

Now with recent trunk builds, with musl and kernel 4.1.x, I've had to
cut features considerably just to make it fit. Just adding openvpn with
openssl support means that an image prior that built at 7MB would
balloon out to 8MB which would mean that the image would not be produced
as it is too big.
Last time I compared musl vs uClibc images, the size difference was
neglegible. I'd say it's more likely that the switch to Linux 4.1 caused
the size increase (the kernel does get more bloated with each new release).

- Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to