This machine is a Twinhead Superset 590, a 386sx with 4MB of RAM and 80MB of diskpace. The disk is partioned so it has a 64MB root-partition and 16MB swap. It has 2 ISA NICs, a NE2000 and an EtherExpress 16.
I actually installed 16MB RAM, but the BIOS only detects 4MB. The mainboard has several switches, but I can't find any information on them. (mainbord: PS-386VX REV 1 / BIOS: Phoenix 386SX V1.10 20F Lo)
The Linux kernel reports 1.95 Bogomips, which, on the Bogomips-scale, means a 13.3Mhz. (Probably a boosted 12Mhz)
This system was used in the pharmacy of my mother from somewhere around 1990 until 1997 as a terminal to the pharmacy program to order drugs, do bookkeeping and as a register/barcode reader. Since it would have ended up as trash and i was capable of running Linux I saved it to use it as a router/firewall for my parents.
So what I wanted was a system that acted as:
I also liked to be able to log on to the system, but unfortunately OpenSSH doesn't run wel on a 386sx with 4Mb RAM. So I had to install telnet and had to bind it to the internal interface only. So no remote logon ;-( But to monitor the system externally I install the client-version of one of my pet-projects (RAMON) which is not yet released as GPL. This way I got mail when something was wrong with the router and I had graphs of my system performance. Without using much of its resources, it was perfect !
- a DHCP server (so I wouldn't have to change IP addresses)
- a small nameserver (so I wouldn't have to remember other IP addresses ;-))
- a masquerading firewall for our local cable provider
Now because I opted for a full distribution (so that I could easily install or remove stuff using packages). The downside is that I need to use the old harddisk and that upgrading it is hard. (Harder than preparing and testing a floppy). For that I also needed:
- a telnet server (the router doesn't have a keyboard or monitor connected)
- the RAMON endpoint (Resource and Application MONitoring)
Because it is a router, I also like to have tcpdump install, so I can debug network-problems.
- an NFS-server/client (to enlarge the available diskspace)
- an FTP client (for ocassional downloads)
ash-0.2-20 at-3.1.8-22.2 basesystem-6.0-4 bash-1.14.7-23.6x bdflush-1.5-11 bind-9.2.1-0.6x.3 bind-utils-9.2.1-0.6x.3 bzip2-0.9.5d-2 chkconfig-1.1.2-1 console-tools-19990829-10 cracklib-2.7-5 cracklib-dicts-2.7-5 crontabs-1.7-7 db3-3.1.17-4.6x dev-2.7.18-3 dhcp-2.0-5 dhcpcd-1.3.18pl3-1 diffutils-2.7-22.6x e2fsprogs-1.18-5 file-3.28-2 filesystem-1.3.5-1 fileutils-4.0-21 findutils-4.1-34 ftp-0.16-3 gawk-3.0.4-2 glib-1.2.6-3 glibc-2.1.3-15 grep-2.4-3 gzip-1.2.4a-2 inetd-0.16-7 info-4.0-5 initscripts-5.00-1 ipchains-1.3.9-5 ipmasqadm-0.4.2-4 kernel-utils-2.2.22-6.2.2 ldconfig-1.9.5-16 less-346-2 libpcap-0.6.2-184.108.40.206 libtermcap-2.0.8-20 lilo-0.21-15 logrotate-3.5.2-0.6 MAKEDEV-2.5-2 mingetty-0.9.4-11 mktemp-1.5-2.1.6x modutils-2.3.21-0.6.2 mount-2.10r-0.6.x nc-1.10-6 ncurses-5.0-12 net-tools-1.54-4 newt-0.50.8-2 nfs-utils-0.3.1-0.6.x.1 ntsysv-1.1.2-1 openssl-0.9.5a-29 pam-0.72-20.6.x passwd-0.64.1-1 pcre-3.4-2.rh6 popt-1.6.2-6x portmap-4.0-19 procps-2.0.6-5 psmisc-19-2 pump-0.8.3-2_mind_1 pwdb-0.61-0 readline-2.2.1-6 redhat-release-6.2-1 rmon-endpoint-0.9.1-ibmbe.1 rpm-4.0.2-6x sed-3.02-6 setup-2.0.5-1 setuptool-1.2-3 shadow-utils-19990827-10 sh-utils-2.0-5 slang-1.2.2-5 ssh-1.2.30-1i ssh-clients-1.2.30-1i ssh-server-1.2.30-1i symlinks-1.2-8 sysklogd-1.3.31-17 SysVinit-2.78-5 tcpdump-3.6.2-220.127.116.11 tcp_wrappers-7.6-10 telnet-0.17.6x-18 telnet-server-0.17.6x-18 termcap-10.2.7-9 textutils-2.0e-6 tmpwatch-2.8-0.6.x util-linux-2.10f-7.6.2 vim-common-5.7-0.6x vim-minimal-5.7-0.6x vixie-cron-3.0.1-40.1 wget-1.5.3-6 which-2.9-2 xntp3-5.93-15 zlib-1.1.3-25.6
I have a set of customized sysctl parameters to change my kernel's behaviour using the /proc-interface. (insert those here!)
Having Red Hat 6.2 installed on a 64Mb partition is not easy. As mention earlier I made a script that removed everything that is useless for my installation. The script looks like this:#!/bin/sh echo -en "Removing stuff:\t\t\t" rm -rf /usr/man/* /usr/doc/* /usr/share/doc/* /usr/info/* \ /usr/share/info/* /usr/share/vim/*/doc \ /usr/share/vim/*/syntax/* /usr/lib/kbd/unidata/* \ /usr/include/* echo -n "#" cd /usr/share/locale/ \ && ls -I "nl*" -I "en_GB" -I "en_US" | xargs rm -rf echo -n "#" cd /usr/share/i18n/locales/ ls -I "nl*" -I "en_GB" -I "en_US" -I "POSIX" | xargs rm -f echo -n "#" cd /usr/share/i18n/charmaps/ ls -I "ANSI*" -I "ISO-8859*" | xargs rm -f echo -n "#" cd /usr/lib/gconv/ ls -I "ANSI*" -I "ISO-8859*" -I "lib*" -I "gconv*" | xargs rm -f echo -n "#" cd /usr/share/terminfo/ ls | grep -v "[adilmnprstvwx]" | xargs rm -rf echo -n "#" cd /usr/share/zoneinfo/ ls -I "??T" -I "E*" -I "G*" -I "U*" -I "posix*" -I "right" | xargs rm -rf echo -n "#" cd /usr/share/zoneinfo/posix/ ls -I "??T" -I "E*" -I "G*" -I "U*" | xargs rm -rf echo -n "#" cd /usr/share/zoneinfo/right/ ls -I "??T" -I "E*" -I "G*" -I "U*" | xargs rm -rf echo -n "#" cd /usr/lib/kbd/keymaps/ ls -I "i386" -I "include" | xargs rm -rf echo -n "#" cd /usr/lib/kbd/consolefonts/ ls -I "lat*" -I "iso*" -I "cp*" -I "def*" -I "*.cp" -I "alt*" | xargs rm -rf echo -n "#" sync echo -n "#" echo exit 0I put my little script into /etc/cron.weekly to make sure diskspace was kept to a minimum even when I forgot to clean up after updating stuff.
To save even more diskspace (and to be able to have more then 1 kernel) I had to copy the kernel and the necessary modules from the RPM files. Sadly this breaks some dependencies.
These tests were performed with a 2.2.19-6.2.12 kernel and consisted of 2 passive FTP sessions through this machine.
This machine was able to forward/masquerade at the fabulous speed of 219 kB/sec which equals about 1.75 Mbps without latency. During these tests the CPU usage raised to +-20% (all taken by the kernel) and a load of 0.3. It (thankfully) doesn't swap and has around 410 interrupts per second during the tests.
My (unfunded) guess is that the bottleneck is the limitation of the ISA bus while forwarding packets.
You can see performance graphs of this 386sx router, generated daily with RAMON.