Choosing Hardware for Linux

By Martin Houston

The Linux system is reasonably easy to please when it comes to the hardware on which it runs. Over the past months I have given out quite a bit of advice to people on choosing a machine for Linux. I thought that it was time to turn these snippets of advice into a proper article - with an eye on producing a low cost but decent machine to run the very low cost Linux software on.

Firstly how much do you think you are going to have to spend to run Linux (assuming you do not have a suitable machine already)? The trite answer is a lot less that you would have to spend to run Windows 95! Seriously though Linux, with the ability to only configure in parts of the operating system that you actually need is "lean and mean"

At the low end of aspirations a 386sx/16 system with a 40MB hard disk and 2MB of memory - the sort of thing that can be bought second hand for a hundred pounds or so - is just capable of running Linux, you might have to get a friend to compile you a minimal kernel though. The two main limiting factors for such a system are slowness and lack of memory (which leads to greater slowness - hard disk speed is a staggering one and a half million times slower than main memory!). However as Linux does have proper support for virtual memory such a lowly machine could be put to useful tasks. Simple text editing and using tools like awk and perl to write programs would certainly be possible. Although I said that swapping to disk is so much slower than main memory on a human time scale a program can be swapped out and in again while you are typing at it without their being any noticeable delay.

Linux, even on a slow machine, is still fully network capable so cheap slow machine could gainfully be employed to act as secondary storage space, or even somewhere to put less speed critical peripherals like printers or low speed modems - possibly even a server to make available World Wide Web pages.

Choosing a Processor

Unless you already have a 386 machine or are practically being given one I would recommend that you set your sights at least on a 486. Forget completely 8086 and 286 based systems - they may be going for a song but they will never run Linux - the only use perhaps is as cheap serial or networked terminals using the excellent (and free) PC Kermit software. But that is another story .

It seems that everybody is in a rush to upgrade their machines to DX/4 and Pentium to face the demands of the latest games and Windows software. There is a glut of perfectly good 486SX and DX processors and mother boards on the market, not to mention complete systems. You should be able to pick up a reasonably modern board with processor for about 50 pounds. Don't be talked much higher than this though the latest 100MHz DX4 motherboards are only around a hundred quid!

Buses

No not the number 28 to Clapham! The Bus is the means by which the optional and changeable parts of the computer are connected to the mother board. There are no less than five choices of Bus that you may encounter - I will list them in order of increasing desirability.

Microchannel

- Used by IBM PS/2 machines and a handful of other manufacturers. Was intended at the time to address some of the larger design goofs of the old IBM AT Bus but never really caught on. Support for PS/2 machines is not a standard part of Linux but some people have made it work. Probably not worth the extra hassle unless you are getting an otherwise nicely specified machine for nothing!

ISA

- Industry Standard Architecture is the newer name for the original IBM PC Bus as extended for the IBM AT. It is by far the most common Bus and is usually offered as well as one of the more exotic offerings. The advantage is that there is a truly staggering choice of standard ISA add on cards. The disadvantage is that cards have to be configured so as not to overlap system resources such as interrupts and IO ports. ISA bus is also not very fast. It is generally OK for modem and ethernet cards but shows its age when used for video display and hard disk controllers. Although any machine (apart from an IBM PS/2) will provide ISA slots it is better not to use and ISA cards if you can avoid it. Linux combined with a 386 or above is a FULLY 32 BIT SYSTEM Unlike Windows 95 which is a hybrid rather than 32 bit system the only time Linux uses 16 bit code is in the bootstrap and when using the optional DOS or Windows emulation software. As the ISA bus is only 16 bits wide any use of it is a bottleneck which might slow other things down. The processor naturally wants to operate a full 32 bits wide at a time. Anything going over the ISA bus is broken up into two separate 16 bit wide transfers. This is not just slow for the device involved it is more overhead for the processor as well (but you will only see it in full 32 bit mode, 16 bits at a time is the most DOS and usualy handle as well). This is the reason ethernet adaptors are available on the faster buses even though 10 Mega Bits per second ethernet speed is supposedly within the capabilities of the ISA bus.

EISA

- This is an attempt made some years ago now to compete with the then perceived threat of Microchannel and to fix the speed and general awkwardness problems of the ISA bus. EISA was only aimed at the high end of the PC marketplace - network fileservers and the like. There are some EISA choices for disk controllers, video cards and network cards. However EISA machines and EISA cards are comparatively rare. Unlike Microchannel the Linux kernel does have support for EISA. However don't go out of your way to buy an EISA machine. The performance of the bus is not as good as the two recent bus developments VESA VL Bus & PCI.

VESA VL Bus

- This bus grew out of a standardisation effort between video card manufacturers who needed a way to provide a full 32 bit wide path between CPU and video card to enable the support of the high resolution screen displays. It was also found that hard disk controllers and ethernet cards benefited from the same shortcut. The disadvantage of VESA is the number of cards that will work together on the bus is very strictly limited to two - perhaps three if you are lucky! Other functions need to be done with standard ISA bus cards and this can slow a whole system down. The upside is that VESA mother boards and cards are fast and cheap. They work with just about any release of Linux as they look just like ISA bus cards to the software unless special features are used.

PCI

- This is a new High Speed bus developed by Intel and being adopted by everyone - so much so that the nearly as fast VESA bus mother boards and cards are being unloaded on the second hand market for a song! That is not to say PCI machines carry a heavy price premium; if you are buying a new rather than second hand machine then a PCI mother board and ALL PCI cards is the sensible way to go. Indeed for a Pentium class machine PCI is a necessity as the humiliation of 16 or even 8 bit transfers across the old ISA bus is just too much of a waste of resources! You will need a recent Linux kernel to support PCI and as PCI has not been that long established there may not be stable and reliable device drivers for all PCI hardware yet.

In conclusion

If you are buying a new machine - go PCI throughout - but check Linux compatibility with the hardware you are buying before parting with any cash. You can buy 486 mother boards with PCI slots usually for only a small price premium over what an ISA/VESA board would cost. For a Pentium you will get PCI by default. If you are buying second hand then the coming of PCI is good news for you too. VESA bus mother boards and cards are very cheap and nearly as fast - although not as easy to set up and with a 2 or 3 card limit in any one machine.

Thanks for the Memory...

By far the biggest expense in a PC is the memory. A meagre, even for Linux, 4MB will set you back nearly a hundred pounds. For the same money you can get a complete 100MHz mother board or a 500MB hard disk. The price of memory at the moment is just plain stupid and will hopefully bust as spectacularly as the Black Wednesday stock market. While the price of memory is so high it is also a prime target for thieves so don't boast about your 32MB or you may find your PC in pieces one day!

While memory prices are in fantasy land what is the budget constrained Linux user to do? There are two factors that must be considered as the market value of memory is likely to bust at any time. Firstly don't hold more memory than you need and secondly plan your memory purchase so that you are not left having to remove and exchange memory to get a larger capacity in future.

A good (but possibly already out of date) tip is to look for mother-boards that have sockets for both 30 pin and 72 pin SIMM memory modules.

As future high capacity memories are likely to be 72 pin as the norm in the future it makes sense to fill your 30 pin SIMM memory banks first - as the 30 pin memory may be out of general production and therefore rare & expensive if you populate 72 pin SIMM slots first. All the above is irrelevant if you can get 72 pin memory much cheaper than 30 pin!

There is a great deal of rubbish spouted about how much memory real operating systems require, Windows95, OS/2 Warp and Linux are all 'speed challenged' with just 4MB. Even if your machine is only a 386 the speed improvement going for 4MB to 8MB is so great that you really cannot value your time at all if you struggle along with 4MB. 8MB is a comfortable amount for 386 and 486dx systems and a more generous 12 or 16MB for 486/66 and 100. If you are investing in a Pentium then 16 or 20MB memory would be an appriopriate complement.

The Hard Facts

Hard Disks. You should really consider a machine with an IDE or preferably EIDE disk controller. New EIDE hard disks are now around 150 pounds for a Giga Byte!. Second hand drives should be priced in relation to this - with a reduction also for being second hand. Thus a 250MB IDE disk second hand should cost no more than (150/4/2) or 20 pounds, at least it gives you a starting position for haggling ;) Hard disks smaller than this are practically being given away but would still prove useful in the small Linux machine.

At the other end of the scale are hard disks with the SCSI interface. These are usually only available with capacities of half a Gigabyte up. Coupled with a VESA or PCI SCSI controller they give considerably better performance than even EIDE. SCSI disks have been a bit of a nuisance to support under DOS - they are not part of the original PC-AT scheme of things and so need special BIOS ROMs to boot from and special device driver software. Linux has no prejudice - it has standard device drivers for SCSI just as it has for IDE. A good SCSI card will handle the disks (and CD ROM, Tape drives, etc...) with far less involvement from the CPU than IDE requires. This means that the processor is able to get on with other useful work while data is traveling to and from the disk. For DOS and Windows this was of limited use as what you were doing at the time was probably dependent on the disk transfer finishing before continuing anyway. However Linux and other real multi-tasking systems will find that the amount of extra performance difference between a SCSI and IDE equipped machine to be definitely worth the extra cost of SCSI controllers and peripherals. SCSI is the system used by most of the BIG Unix mini-computers such as HP-9000 and IBM RS-6000.

A word of warning about buying second hand SCSI disks. They are used by the truck load in the big systems. A hard disk has a finite life, and unlike a car there is no mileometer to check. If you are offered SCSI drives on the cheap bear in mind that their previous life might have been one of hard work inside a big multi-user system rather than the comparatively leasurley life that most PC hard disks get!

A disk that is a few years old may keep working for you for a good few years more. On the other hand the disk may have been removed from its home with only a few months to go before the expected end of its life. Such planned swap out of hard disks makes a lot of sense to operators of big systems. Arranged downtime and no data loss is much preferable to a disk crash and lost data!

Never, ever pay good money for a disk that whines - it is a sign that the disk bearings are beginning to wear. Such a disk, if you can put up with the noise, may still have several months of useful life left, but it may fail at any time. So be careful! One possible use could be to act as a cache for your Linux CD-ROM. When the disk does finally fail you will have a minor inconvenience - but maybe a system crash but should have not lost any data.

Getting the Picture

Will you be using the XFree86 X Windows software with Linux? If the answer is yes then you will have to 'cram in the RAM'! Whereas a 4MB machine is just adequate for running a Linux machine in text mode - even with several users, using X Windows pushes the absolute minimum memory requirement to 8MB with a 'comfort level' of 12 or even 16MB depending on what you wish to do. If you add the cost of this extra memory XFree is not so free after all! Even 16MB which is the maximum memory that most people even think of buying is small compared to the memory in todays big Unix machines and even in Unix Workstations. Computer Aided Design and other specialized Workstations often have 64 or even 128MB of RAM. Remember that using data from RAM is over a million times faster than having to fetch it from disk. Therefore having very large memories can enable such machines to tackle jobs that a 16MB PC could only dream of - even though the CPU speed is not all that much greater.

If you are serious about using Linux as a real X Windows Workstation then 16MB of RAM is an absolute minimum. If you want to run the same sort of packages that modern Unix Workstations can you will have to match their memory capacities - there is no shortcut or bodge. However even with the current high price of memory a Linux Pentium PC with 64MB of memory is only the fraction of the cost of a dedicated Workstation and capable of doing most of the same things.

The other part of the equation for a serious Workstation is the video system. Forget ISA bus VGA card and 14" screen! What you need to give X a chance to shine is a good VESA or PCI video card with at least a 17" Monitor. If you are going to be using X Windows on more than a casual basis it is well worth the investment on a big, clear screen. Good 17" monitors only cost around 400 pounds nowadays - that's about 250 more than a cheap 14" one.

A Dream Spec

If money was no object my ideal Linux machine would be a P6 processor (Intel - you would like to make sure that the P6 is Linux compatible wouldn't you?) with all PCI bus cards. To this I would add 4 GB of fast, wide SCSI hard disks as 2 x 2GB disks rather than one big disk. This would be complemented by SCSI DAT tape drive and the new Plextor 6.6 speed CD ROM.

To this I would add 64MB of memory - as that is what serious multi-user Unix boxes seem to start at these days and an accelerated video card with 4MB of video memory and a 21" monitor.

The cost of all this? I've not bothered to add it up but probably about the same as a decent car. In contrast really aggressive spec Unix Workstations have been into the hundreds of thousands of pounds!

A Practical Spec

OK, you only have a couple of thousand to spend. You can still get a very 'hot' Linux machine. Here is a sample spec.

PCI Bus mother board again. The price premium is so small now that it is worth paying for the ability to choose ALL PCI expansion cards. Even if you mother board has ISA bus slots try to avoid using them if you want real performance.

Processor. At the moment (although things may have changed by the time you read this) the AMD DX/4 chip offers by far the best price/performance ratio. PCI mother boards complete with DX/4 processor can be had for around a hundred and fifty pounds. A Pentium 100 board/processor combination is at present about 200 more than this. So for 200 you get about double an already very quick performance. BUT if you are on a budget 200 pounds worth of memory will probably gain you more real world performance than uprating the processor. A DX/4 seems to have more than enough clout to play the latest full motion video games so don't let your judgement be clouded by Pentium envy.

With the money saved from having a DX/4 instead of a Pentium get a full 16MB of memory. If you can afford it get even more - Linux will always make best use of the memory it has, if nothing else it will mean more data from the hard disk can be cached. Please bear in mind that memory is very expensive at the moment and the price is bound to come down a lot sooner or later. However why waste time with a machine that is only working at a tiny fraction of its possible speed because you have been memory mean? Machines that serve hundreds of users have big memories rather than very fast processors.

You will find a 17" monitor is probably big enough for your needs. Do try and get a video card with at least 2MB of video memory on it though - otherwise you will be limited to 1024x768 pixel resolution rather than the more Workstation like 1280x1024.

Lastly Hard disk space. Go for SCSI if you can because of its much better performance under multi-tasking conditions. However 1GB EIDE drives for about 150 are hard to resist! Why not go for both? A 500MB or so SCSI for the core of critical files and an EIDE or two for bulk but less heavily used storage?

Conclusion

I hope this tour of PC hardware for Linux has been useful. If you have any feedback - like suggestions of particularly well performing devices that other Linux users should try please email me at mhouston@mh01.demon.co.uk