Subject: trimming RAM usage
To: None <port-hpcarm@netbsd.org>
From: Michael Blatt <michael.blatt@gmail.com>
List: port-hpcarm
Date: 02/09/2006 16:20:53
Hi all,
I guess this may not be HPCARM-specific, so feel free to tell me off for th=
at.
I have been searching for info on lowering memory usage on my J720,
running NetBSD 3.0-RELEASE.
I didn't find any given page, but googling and a bit of embedded Linux
experience helped. My aim is to be able to run the meta-port of
matchbox-0.9.5 (wm, panel, etc) with dillo together and not having any
app killed for want of RAM.
I do have NFS-Swap, but it's neither fast nor always available.
So far these are the points that I figured could be acted upon:
1. recompile the kernel, remove unnecessary drivers and features.
My kernel is 2.6 MB because I've had to include APM + IPSec, and
uses 4236K.
It is 2.2MB without. Anyone managed to trim it further?
2. replace the built-in SSH with dropbear? Anyone done that?
3. is there a low-memory alternative shell, that uses less RAM than
ksh or bash? (doubt it but thought I'd ask, I surely didn't find one
that claimed to)
4. only have one or two gettys
5. don't use xdm (uses 1.2-1.5MB)
6. if using PF as a firewall, disable pflogd (~3MB!)
7. any recommendation for sysctl vm tuning?
my sysctl.conf has got this:
vm.anonmin=3D5
vm.execmin=3D5
vm.filemin=3D0
vm.anonmax=3D95
vm.execmax=3D10
vm.filemax=3D5
vm.bufcache=3D5
But I feel something is wrong. It works better than the default though.
8. use mount_mfs sparingly :)
9. avoid using dhclient (almost 1MB)
Anything else that I have overlooked?
Thanks,
M.