On 2013-09-08 11:26 AM, Russell Senior wrote: > > I have a number of (admittedly) ancient Netgear WGT634U's in the field > doing duty as free-wifi hotspots. Recent builds of our standard set > of tools have become unhappy in the last year or so. For example, > here are the RES memory sizes of processes on our workload, comparing > r37911 (current) with r34240 (circa Nov 18, 2012): > > r37911 r34240 > > RSS command RSS command > 3700 gateway 3000 gateway (nocatauth, w/ perl) > 1400 snmpd 1240 snmpd > 1196 openvpn 3400 openvpn > 736 olsrd 628 olsrd > 732 olsrd 572 olsrd > 664 netifd 268 netifd > 656 procd 76 init > 104 init > 108 rcS > 632 top 612 top > 532 dropbear 540 dropbear > 496 ash 480 ash > 492 logread 168 syslogd > 488 hostapd 392 hostapd > 456 crond 332 crond > 448 udhcpc * (used static config, so no udhcpc) > 248 hotplug2 > 420 dropbear 188 dropbear > 384 logger 172 logger > 164 logger > 380 sh > 376 dnsmasq 440 dnsmasq > 372 radvd 188 radvd > 256 radvd 320 radvd > 364 ntpclient 200 ntpclient > 280 ubusd 56 ubusd > 272 sleep > 224 askfirst > 68 ?? > 84 watchdog > ------------- ----------------- > 15956 14048 > > Today's resident size is almost 2 megabytes larger than a year ago, > even after a substantial improvement in the openvpn size (I switched > to polarssl). > > Admittedly, the numbers are just a convenience sample (r37911 just > booted, r34240 has been up for 44 days) and might not be a fair > comparison in all cases. But, the direction here seems to be making > the WGT634U less viable for us. > > Are these numbers illuminating at all? The increase in individual processes is interesting, but you made one mistake here: Adding up the RSS numbers does not yield the total memory usage, but a gross overestimation of it. Much of the memory use is coming from uClibc and other shared libraries, and most of that is shared in RAM as well. To fix that counting error, you can enable CONFIG_PROC_PAGE_MONITOR in your kernel config. This enables /proc/<pid>/smaps, which contains a Pss value for each mapping. For all shared parts, the memory amount is divided by the number of processes sharing it.
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel