Tips for reducing memory usage
by David Härdeman <david@hardeman.nu>
Note: this document currently describes Debian etch (4.0) and needs to be updated to Debian lenny (5.0). Some of the hints may still apply, but some may not.
- If you do not have a serial port on your NSLU2, you can remove the
getty on the serial line by commenting the corresponding line in
/etc/inittab, e.g. change the line
to
T0:23:respawn:/sbin/getty -L ttyS0 115200 linux
then run#T0:23:respawn:/sbin/getty -L ttyS0 115200 linuxto tell init to re-read the inittab file.telinit q
- If you are not using LVM, /etc/init.d/libdevmapper1.02 will
still load the device-mapper kernel modules. Since libblkid1 depends on
libdevmapper1.02 and mount depends on libblkid1, it is not possible to
remove libdevmapper1.02. Instead you can prevent the script from loading
the modules by inserting
on the second line of /etc/init.d/libdevmapper1.02.
exit 0
- If you are not using IPv6, you can prevent the module from being
automatically loaded by adding the line
to /etc/modprobe.d/blacklist. The same goes for any other kernel module which is automatically loaded which you know you won't need.
blacklist ipv6
- Removing daemons that are not needed will of course also help. Starting aptitude and marking all packages as auto-installed by selecting the Installed packages line and pressing M, and thereafter checking through the list and manually marking the packages you want to keep by pressing + is usually a good start.
- openbsd-inetd will only start if there are services activated in /etc/inetd.conf. Often the only services provided are old Unix services which are not necessary and inetd can be disabled by commenting all services in /etc/inetd.conf.
This article has been contributed by David Härdeman <david@hardeman.nu>
Go back to the Debian on NSLU2 page.