Memory leak in Turris system

After 24 hours running default Omnia configuration + Majordomo (with database on external fast USB) free router’s memory is only 5%. Top shows strange multiple instances of foris with the high memory allocation. Is it normal?
> PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command

 5624 root       20   0 19252 14764  4392 S  0.0  1.4  0:00.35 python /usr/bin/foris -s flup
 4526 root       20   0 19252 14764  4392 S  0.0  1.4  0:30.15 python /usr/bin/foris -s flup
 4624 root       20   0 19252 14764  4392 S  0.0  1.4  0:00.01 python /usr/bin/foris -s flup
 4625 root       20   0 19252 14764  4392 S  0.0  1.4  0:00.04 python /usr/bin/foris -s flup
 4626 root       20   0 19252 14764  4392 S  0.0  1.4  0:00.00 python /usr/bin/foris -s flup
 4627 root       20   0 19252 14764  4392 S  0.0  1.4  0:00.01 python /usr/bin/foris -s flup
 4628 root       20   0 19252 14764  4392 S  0.0  1.4  0:00.00 python /usr/bin/foris -s flup
 6279 root       20   0 16424 12492  8392 S  0.0  1.2  0:36.87 ucollect /tmp/ucollect
 4162 root       20   0 34244 11008  3808 S  0.0  1.1  0:05.89 /usr/bin/kresd -c /tmp/kresd.config -f 1 /tmp/kresd -a 0.0.0.0 53 -a :: 5
 2515 root       20   0 10304  7956  7744 S  0.0  0.8  0:12.46 lcollect /tmp/lcollect
 5623 root       20   0  8076  5516  2452 S  0.0  0.5  0:00.18 /usr/bin/nuci
 1899 root       20   0  6248  5484  1916 S  0.0  0.5  0:00.40 /usr/bin/python /usr/sbin/sfpswitch.py --nodaemon
 2099 root       20   0  4448  2420  2164 S  0.0  0.2  0:01.54 /usr/sbin/syslog-ng
 9433 root       20   0  5348  2224  2028 S  0.0  0.2  0:00.09 sshd: root@pts/0
 4524 root       20   0  4224  1828   808 S  0.0  0.2  0:01.60 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
 6282 root       20   0  2744  1692  1556 S  0.0  0.2  0:00.51 socat STDIO OPENSSL:api.turris.cz:5679,cafile=/etc/ssl/ucollect-server.pe
16482 root       20   0  1220   980   776 R  0.0  0.1  0:01.02 htop
 1920 root       20   0  1512   868   728 S  0.0  0.1  0:03.83 /sbin/netifd
 1845 root       20   0  1872   808   712 S  0.0  0.1  0:00.03 /sbin/rpcd
    1 root       20   0  1336   756   620 S  0.0  0.1  0:03.77 /sbin/procd
 3032 root       19  -1  1480   744   644 S  0.0  0.1  0:00.00 /usr/sbin/ulogd -d
 4581 root       20   0  1076   744   716 S  0.0  0.1  0:00.15 /usr/sbin/ntpd -n -S /usr/sbin/ntpd-hotplug -p ntp.nic.cz -p tik.cesnet.c
 1970 root       20   0  1096   688   612 S  0.0  0.1  0:00.80 /usr/sbin/odhcpd
 2442 nobody     20   0   876   680   640 S  0.0  0.1  0:02.10 /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k -x /var/run/dnsmasq/dnsmasq

Just to be sure, are you counting buffers and caches as free?

I’m not sure about buffers level. I used information from LuCI Status->Overview Total available and Free. Nevertheless 4% of free memory is really extreme…

I think that page uses free from system, at least when I dropped caches percentage of free memory jumped to be quite higher. So it might be just caches.

1 Like

To verify:

cat /proc/meminfo | grep Cached

For more: http://lists.busybox.net/pipermail/busybox-cvs/2010-August/031640.html

I can confirm that memory tends to run out quickly, however, I would not call it memory leak. It is just a default caching setting for OpenWrt. I also get about 5% left when copying something from the USB HDD attached to Omnia.

http://www.linuxatemyram.com/ :wink:

2 Likes

I want to meet the guy who bought a URL just to make a point. :grinning: Is it you, nerdpunk?!

no, it’s this guy: http://www.vidarholen.net/contents/index.html

but he’s not trying" to make a point"… this is a question people are asking for many many years, it’s just nice to point them to a webite instead of having to explain it over and over again :wink:
and there are more webites like this

3 Likes

The crazy thing is that Windows does the same but Microsoft hides the numbers a bit better.

Should we hide cached from this luci page?

Or display it lilke this but without the red value (dirty)?

Values are: used, used+buffers, (dirty), free+buffer, free

1 Like

I think that people tricked by this at least discover something about OSes that they wouldn’t know otherwise.

Indeed I have 4% left after I copy something to the NAS, also the CPU load gets up incredibly high copying files.

It seems to me that every Sunday at 2:00 a.m. (UTC+1) something changes the memory use. See my rrd charts. In the day graph is wisible that 2:00 is quite sharp, in the weekly graph is visible the regularity.
There is nothing in cron.

There is a cron at 02:05 on sunday: schnapps cleanup --compare.
It compares different snapshots of the filesystem for changes using file compare. This explains the cached memory rise.

Cronjobs of packages can be found in /etc/cron.d.

1 Like

Thanks for explanation. I missed the cronjobs of packages. :confused:

On old Turris i see about 90% free RAM anytime(luci) :slight_smile: Its older Turris cache hide from luci page? :slight_smile:

This is still an issue. After 9 days of uptime I have only 9% of free memory left on the 2GB version.

Omnia has some serious software issues that are probably related to the software team being understaffed.

…and you’re sure it’s taken by any process (which one)? if it’s just filling up io-buffers, eveything is perfectly fine (see above)

I’ll find out which process (if any) it is.
Anyway, this is one of the concerns I have, the other are related to the segmentation faults on software install attempts.

It doesn’t look like any process is consuming all that memory. I still think it’s strange the memory usage is reported this way. I’m assuming it’s something internal to OpenWRT.