SMP Linux
Although there was no real good reason to bother — our single-processor Cyrix 266 central server is thoroughly under-utilised — it seemed like fun to try out SMP (Symmetric MultiProcessor) Linux. So in a scrooge-like fashion we hunted around for a low-cost setup to give it a try.
Scouring the classified ads, we found what looked like a good bet for the motherboard and ordered it. A week later and about 20 calls to the courier company (who were unable to read the index in the local A–Z) it arrived. An ATX motherboard with the Intel LX chipset and apparently all the right trimmings — except for one thing; reading the documentation there was a worrying reference to the need for an ‘APIC’ chip to enable dual-processor support. This was reinforced by the fact that there was only one clip for a PII processor in the motherboard box. A call to our supplier confirmed that as well as the £65 we had paid for the motherboard we would also need the APIC module at an extra £20. Keen to get going and not able to face harrassing the couriers again, a 100-mile round-trip drive on Saturday morning produced the necessary little scrap of plug-in board. Encouragingly, when it was unwrapped it proved to come with the second CPU clip as well.
Making the eyes water, the best price we could find a pair of same-speed processors at was about £150 each for PII/300s, so a short trip to a different supplier enriched Intel significantly. After some fiddling around, the motherboard was put into an ATX case and powered-up. Well, once the jumpers on the motherboard had been set correctly — the board comes as default with a jumper setting to clear the CMOS RAM and that has to be changed before the smart power-on stuff will pay any attention to the ‘on’ switch.
Gloom was the only result. The board appeared dead; power would come on and the CPU fan ran (we decided to install Linux single-processor first) but the monitor remained resolutely dead. That plus a strong smell of burning — long faces all around. Presuming that somehow the processor had got fried the exercise was on the point of being abandoned, when a last despairing swap around of the CPU sockets was done and we prepared to head for the pub and drown our sorrows — to general astonishment the monitor sprang to life with the BIOS messages. We stuck in the other processor — the BIOS said that there were two CPUs and warned that the APIC module wasn't in.
Revitalised, we installed Red Hat 5.1 (kernel 2.0.34) with just one CPU, checked that it ran OK (it did) and ran some simple benchmarks. Even single-processor it was clearly a lot faster than the Cyrix-powered machine — about 50% altogether. Later we found that its memory transfer rate and disk speed are much better than we get from the Socket 7 motherboard that the Cyrix lives in, but we haven't found out why yet. The pub intervened.
Next morning came the challenge of recompiling the kernel. It's easy enough to do, and removing the comment from the line that says "SMP=1" in the Makefile is not exactly difficult. The biggest problem came from the module support in the startup files. Kernel modules need to be recompiled to support multiprocessor working, but if you (as we had) have an SMP and non-SMP version of the kernel at the same release level (2.0.34), everything gets confused about which set of modules to load from the modules directory. Eventually we got around it by lying about the release level and renaming everything by hand to pretend that it's really 2.0.35. Now we have LILO set up so that we can either boot ‘linux’ or ‘smplinux’ and they work just fine.
Some very simple tests show that we do indeed get two processors. The output from ‘top’ (below) shows two looping programs each getting almost 100% CPU allocation. Interestingly, the summary statistics allocate one of the processors to ‘system’ time, claiming 99.2% user and 100.7% system.
And that was that! It works. It's not been in use a lot yet, so there may be some more to say later, but the machine is now being used as a workhorse to see if it proves any less reliable that the single-processor version. Considering the ridiculous price of Pentium II processors, it seems very hard to justify using multiprocessor systems unless you really have to: the price/performance compared with non-Intel processors is very poor — our local low-cost supplier does Cyrix 233 processors for £35 compared with almost four times as much for the Intel PII with about 50% better performance. Still, we plan to use the machine for some heavyweight compute-intensive activity later this year and it will be interesting to see how it shapes up. Our guess is that it will be better to use a number of lower cost systems, with each person getting a dedicated low-price processor than sharing the high-cost SMP box. It's been fun though!