Cult of Linux, and cheap cheap hardware

Potpourri. I just have two little things to write about today, so that’s what I’ll do.
The Cult of Linux, and cults of computing past. In yesterday’s comments, Dave Thorarinsson brought up an interesting phenomenon. He observed, when talking about his new Linux box and losing track of time learning it, “It pretty much feels like the time I had my Amiga.”

I remember reading in the mail section of Amiga magazines, more than a decade ago, “I haven’t had this much fun since I got my C-64!” And the old Commodore magazines noted that their C-64s had a special place in their devotees’ hearts and asked, “Have you ever heard of anyone getting attached to a PC clone?”

The inferred answer is no. And that doesn’t seem to have changed. Today, the biggest PC enthusiasts replace their machines frequently, relegating their old, unbeloved machines to grunt roles, or scrapping them for parts.

The C-64, by contrast, was a simple machine. Although it only had one slot for expansion, the motherboard itself was simple enough that just about anyone with a little bit of patience could trace it out and understand it. There was some unused address space in it that you could add chips to. Common projects included speech synthesizers and an extra sound chip, so you could have six-voice, stereo sound. And it seemed like most C-64 owners had tried their hand writing at least simple programs.

The Amiga was similar. It was harder to program, and a little harder to hack, but I had a subdirectory on my Amiga’s hard drive that was called “PD Hardware,” containing makeshift schematics for stuff I could build. I wired in a PAL/NTSC switch so I could change video standards and run European software correctly. I even designed an add-on board for it myself, once, to give myself an extra ROM socket. And of course I replaced much of the operating system with replacement utilities written by hobbyists that were smaller and faster, had more features, or both.

You want to know why the Amiga and C-64 fanatics were so loyal? They knew their machines inside and out, and to a degree that just wasn’t possible with a PC clone.

With Linux, the hardware doesn’t matter anymore, but you can customize the software to whatever extent you want. The hardest-core Linux people are doing just that. At a level below that, people compile the OS from source, from scratch. At a level below that, they just replace utilities with smaller and faster or more functional ones, like I was doing with my Amiga.

The long and the short of it is tweakers have a lot more liberties with Linux than they’ll ever get out of Redmond.

People who liked my book can certainly find a lot to like with Linux. People who fancy themselves experts but don’t really want to know how their computers work and who think books like mine are a waste of time will never be tied to Linux like the fanatics are.

Cheap hardware. It’s a buyer’s market. I’m building an intranet server for my church, and they have lots of bits and pieces but not quite enough for a complete system, so I did some looking around at my favorite bottom-fishing holes. You can get an awful lot of computer for next to nothing these days.

I’ve bought things at least once from each of these vendors, and they got stuff to me reasonably fast (within a week, ground shipping) so I feel reasonably comfortable recommending them.

Slot-1 barebones systems — case, power supply, slot 1 mobo (66 MHz FSB, so you’re stuck with P2s up to 333 MHz or Celerons, and according to the manufacturer, Celerons will work), and a floppy drive. $24.50. $19.95 if you don’t mind some wear. Very nice.

At the same place, scroll down and you can pick up Tier-1 business-class P2s for under $200. If you’re lucky you can sometimes even find a dual-capable machine. They go fast, but the getting’s good. Lots of businesses are dumping these due to their 3- or 4-year upgrade cycles. For someone who just wants to do word processing and e-mail, these systems are overkill. If you want to upgrade in pieces over the course of the next couple of years, the P2s with a 100 MHz FSB are workhorses and you can add lots of cheap memory, nice video cards, and fast, cheap hard drives. Gatermann just picked up an HP Vectra P2-266, dual capable, with SCSI, for $117. It will serve him well. He plans to run Debian on it, but I don’t know if he’s thinking of it as a server or a workstation. It’d make a fabulous server.

72-pin SIMMs — if you’ve still got a system that takes them, nice deals on 4-16MB sticks, and good deals on bigger sticks.

Low-end Pentium I desktops — P75-120, 16 meg of RAM, 1 MB video, who knows what else. $29.99. Nice for a low-end Linux box, or for a Win95 system that’s going to see limited use. Put a fast hard drive in it and it’ll surprise you. After you get yours, check and see what CPUs the system will take; a P200 can be had for as little as $16 and makes a nice upgrade. It’s a pretty big step up from 75 MHz to 200 MHz.

Seagate 9-gig 5.25″ full-height SCSI HD — $12.95. If you’ve got two 5.25″ bays open and no spacer between them, here’s a cheap way to fill it with 9 gigs of storage. I know a couple of people who have these drives. They’re surprisingly quick (they hold their own next to 7200-rpm 3.5″ disks). Back up your data and buy some spares if the shipping doesn’t kill you. One of the guys I know has several of these, and he’s had one or two die on him.

FIC AZ-11 ATX mobo — $34.95. It’ll take Durons and Athlon Thunderbirds. The fastest chip I’ve put in one is a 1 GHz Duron. No ISA slots and just 5 PCI slots, but it’s a capable board. I use one in my video editing workstation, and I paid more than 35 bucks for it. Totally obsolete, but when you can get a 1 GHz Duron and fan on this board for $89, who cares? It’ll still be a good computer in three years. Trust me.

I keep seeing this board on the closeout places, so I expect even after the current supply dries up, there’ll be more.

Speaking of closeout motherboards, there’s a variety of them over at Just Deals. You can get a Soyo Socket 370 board for $28 and various Socket A boards in the $35-$40 range. If it’s Slot 1 or even Slot A you’re looking for (maybe you’ve got a CPU laying around), you can find stuff there too.

And if you need a cheap copy of Word 97, you can get the Works 99 suite for 30 bucks.

Need an operating system for that new old computer? Prices range from $25 for Win95 to $180 for WinXP Pro.

Honest, the money was burning a hole in my pocket!

I went out shopping yesterday for a white gold rope to go with a white gold cross pendant I bought a month or so ago. I’m no expert on jewelry, but my sister knows as much about jewelry as I do about computers and baseball combined, and she said I shouldn’t buy silver unless I was going to wear it all the time. I don’t wear jewelry all the time, so I took her advice and bought white gold.
I found the chain.

Then I wandered over to the electronics aisle. I saw a $129 KDS 17″ monitor. Pass. I saw other monitors of varying sizes and qualities. Then I walked down the next aisle, where I saw HP Pavilion and Sony VAIO computers. Nothing earth-shattering. Then I saw something that made me do a couple of quadruple takes. A Lexmark color laser printer. Price? Seven hundred bucks. I was shocked. I’m pretty sure the last time I looked, the cheapest color laser you could find was $1500. I remember in the summer of 1994 selling a number of color inkjet printers for $649. So $700 for a color laser printer is a significant milestone, and it’s reason not to pay more than $100-$150 for a color inkjet. If you’re serious about color printing, that laser will give far better output, much faster, and at a much lower cost per page.

Yes, I’d love to have one. But I’ve got a Lexmark 4039 I bought in 1996. It still works fabulously. It also still has the toner cartridge that came from the factory in it. Needless to say, I don’t print a lot. So I really don’t know how I could justify a color laser printer.

So I walked on. I spied some DVDs. I flipped through them. Just a bunch of mediocre movies, most of which I’d never bothered seeing, so I wouldn’t have any inclination to pay $12.99 for them either. Then I turned around. Camcorders! I saw some Sony and Hitachi models, VHS-C and Digital-8, priced very nicely. Very nicely. At $200, I don’t understand why camcorders aren’t as common as VCRs were 10 years ago. You can get a nice camcorder now for what a nice VCR cost then. But that wasn’t what I was looking for.

Next section: JVC and Sony camcorders. Much pricier, but they had the magic word I was looking for: miniDV. I looked at the price: $480 on the entry model. That was about half what the entry models cost the last time I looked. I played around with it. The picture was awfully nice. I played around with the more expensive models. The picture wasn’t any nicer. So I wrote down the model numbers. At $480, I was almost ready to buy right then and there. But $480 is too much to spend casually, so I did a little research online.

Camcorder tip: Go ahead and search the Web for camcorder specs and reviews, but expect not to find much. Searching the web gives the impression the JVC GR-DVL805 doesn’t exist. The low-end JVC GR-DVL100 did have some positive reviews. I searched Google groups and found lots of good insights on both models. (If I find a consensus amongst a bunch of hobbyists who bought a product with their own money and used it long enough to get an opinion on it, I generally trust them. I certainly trust them more than a salesman, and there are problems these people will notice that a video magazine won’t due to lack of time with the unit.)

The DVL100 is lightweight, does a great job of gathering light (most JVCs do, in my limited experience), reasonably easy to use, and the price is right. Only complaint I could find: the tape motor is close to the mic, so you’ll get some motor noise. That’s not much concern for me.

The 805 is essentially the same camera, but it can double as a 0.8-megapixel digital still camera. Other than that, it has the same strengths and weaknesses as its cheaper brother. Since a 0.8-megapixel digital still camera is essentially worthless unless you’re shooting pictures for the Web, that feature isn’t useful to me.

Both camcorders had a few other weaknesses: You can’t plug an external mic into them, and while you can dump video from the camera into the computer via a firewire port, you can’t dump edited video from the computer back to the camera. Those are higher-end features. Neither of those matter much to me either. When I’m doing really serious work that requires those, I’ll be borrowing my church’s professional-grade JVC camera, which does everything but autofocus and make coffee. For projects where I record the audio separately (which is common), this camera will be fine. And as a second camera, it’ll be great.

So I bought it.

I’m amazed at how much video recording and editing power you can buy for $2,000 these days. For 2 grand, you can get a Pinnacle DV500 editing board (with Adobe Premiere bundled) and a low-end digital camcorder and still have plenty left over to buy a computer to connect it all to.

Heat compound and reliability

It’s known by many names. Heat sink grease. Thermal compound. Heat sink compound.

It comes in tubes or syringes. Cost varies from a buck or two to twenty. The cheap stuff is plain old grease. The expensive stuff is made of exotic materials including silver. Read more

Printing with HP

I drove into North St. Louis tonight. The computer lab I set up at Bethlehem Lutheran needed some maintenance. It turned out to be very minor maintenance (fortunately)–their HP LaserJet 1200 printer had come unshared from the Win98 box that hosts it, so none of the other PCs could print. So I reshared the printer, connected the rest of the machines to it again, and printed test pages. It worked. I did a little more cleanup since I was there. These computers live a hard life. Fortunately, they’re completely standard microATX systems so getting parts for them will be easy and cheap.
I really need to set up a Linux box to host the printer though. If the printers were hosted by a keyboardless, headless Linux box, they couldn’t come unshared. A Samba print server takes me about an hour to set up, so it’d be a good investment of time. And I’d have my choice of 486s to do it with. I showed one of their staff how to share out a printer just in case it happens again.

They have a second printer as well, an HP DeskJet 660 donated by one of their field workers, and I was going to hook it up but I couldn’t find the stash of cables I used to have up there. I had a parallel cable out in my car for the longest time too, but I went out there, tore my car apart, and couldn’t find it. I must have given it to someone at some point. So I’ll be making another trip up there next week after I run across one. The DeskJet is just there for backup purposes.

The choice of HP printers may make some people curious. The DeskJet was donated. The 1200 is just a really fast, really inexpensive printer. I know Lexmark has something comparable now, but at the time we bought the 1200, there wasn’t much else in its class. It’s a very solid printer. HP’s not the best about providing new drivers when operating systems come out, but there’s a dirty little secret that apparently people don’t want to talk about (or maybe they don’t know). You can always use an older HP printer driver with newer printers. I could run both the 1200 and the DeskJet off an old LaserJet II driver. Microsoft always provides drivers for some of the classic HP printers. In a pinch, I run laser printers off a LaserJet 4 or LaserJet 5 driver. On high-end printers I lose the ability to select trays, but on a low-end printer like the 1200, I won’t lose a thing. So if you can’t find a driver, try the closest match you can find, and fall back on a lowest-common denominator like a LaserJet II if that fails.

Another RISC platform for Linux

Vintage workstations. I’ve read two articles this past week about running Linux or another free Unix on vintage hardware.
http://www.debianplanet.org/article.php?sid=605
http://www.newsforge.com/article.pl?sid=02/02/19/049208&mode=thread

And while I can certainly appreciate the appeal of running a modern free Unix on a classic workstation from the likes of DEC or Sun or SGI, there’s another class of (nearly) workstation-quality hardware that didn’t get mentioned, and is much easier to come by.

Apple Power Macintoshes.

Don’t laugh. Apple has made some real dogs in the past, yes. But most of their machines are of excellent quality. And most of the appeal of a workstation-class machine also applies to an old Mac: RISC processor, SCSI disk drives, lots of memory slots. And since 7000-series and 9000-series Macs used PCI, you’ve got the advantage of being able to use cheap PC peripherals with them. So if you want to slap in a pair of 10,000-rpm hard drives and a modern SCSI controller, nothing’s stopping you.

There’s always a Mac fanatic out there somewhere willing to pay an exhorbinant amount of money for a six-year-old Mac, so you won’t always find a great deal. Thanks to the release of OS X (which Apple doesn’t support on anything prior to the Power Mac G3, and that includes older machines with G3 upgrade cards), the days of a 120 MHz Mac built in 1996 with a 500-meg HD and 32 megs of RAM selling for $500 are, fortunately, over. Those machines run Linux surprisingly well. Linux of course loves SCSI. And the PPC gives slightly higher performance than the comparable Pentium.

And if you’re lucky, sometimes you can find a Mac dirt-cheap before a Mac fanatic gets to it.

The biggest advantage of using a Mac over a workstation is the wealth of information available online about them. You can visit www.macgurus.com to get mainboard diagrams for virtually every Mac ever made. You can visit www.everymac.com for specs on all of them. And you can visit www.lowendmac.com for comprehensive write-ups on virtually every Mac ever made and learn the pitfalls inherent in them, as well as tips for cheap hardware upgrades to squeeze more speed out of them. I learned on lowendmac.com that adding video memory to a 7200 increases video performance substantially because it doubles the memory bandwidth. And on models like the 7300, 7500, and 7600, you can interleave the memory to gain performance.

Besides being better-built than many Intel-based boxes, another really big advantage of non-x86 hardware (be it PowerPC, Alpha, SPARC, MIPS, or something else) is obscurity. Many of the vulerabilities present in x86 Linux are likely to be present in the non-x86 versions as well. But in the case of buffer overflows, an exploit that would allow a hacker to gain root access on an Intel box will probably just crash the non-x86 box, because the machine language is different. And a would-be hacker may well run into big-endian/little-endian problems as well.

http://homepages.ihug.com.au/~aturner/7200boot.html

Trolling the web for nothing in particular

Yes, Brian, baseball will soon return. I hate the things Major League Baseball does (Bob Costas once likened choosing sides between the players and the owners to choosing sides between Iran and Iraq), but we’ve chosen to stay together for the kids. I’m sure everyone who cares (and some who don’t) can guess what I think of Bud Selig, but I’ll tell you anyway, soon enough.
In the meantime, I look like ArsTechnica today. Oh well. I don’t do this very often.

Blogging. Wired News had its take on the phenomenon, and threw out some interesting stats.


In January alone, at least 41,000 people created new blogs using Blogger, and that number is always increasing, [Blogger founder Evan] Williams said. Some have put the total number of weblogs at more than 500,000.

Alongside the boom, however, there have recently been a few faint signs of backlash. As increasing hordes take on the task of trying to keep new sites looking nice, sounding original and free from banalities, more hordes just seem to fail.

Blog critic Dave Linabury offered a recipe for success:


“It really can take a lot of time,” he said. “I spend two hours a day on my weblog. Many people don’t realize this, they think it’s a quick way to get popular. And after awhile they get really discouraged and say, ‘he got 2,300 hits today, I got four.’ The bulk of people out there get less than two dozen hits.”

“I don’t want to be elitist,” Linabury added, “but all these people out there with popular weblogs, they’ve been doing it longer and they stick to their guns.”

I can attest to that. The people who get more traffic than I get almost all have been doing this longer. But I can tell you one thing: It’s never enough. Back when I was getting 80 visits a day I wanted 150. When I was getting 150 visits a day, I wanted 250. Now that I get about 500 visits a day, I’m awfully distressed to see people are getting 2,300. And by the time I reach 2,300, I’m sure there will be people getting 5,000 or even 10,000. (Note that visits are the number of unique visitors; hits are the number of files served up. Hit count is deceptive. I get 500 visits per day but closer to 1,000 or even 1,500 hits per day, due to people visiting, reading comments, and then often reading something from a previous week. And if they do a search, that’s at least two additional hits.)

Link

Another feather in Internet Explorer’s cap. To my knowledge, no new security vulnerabilities have been reported in Internet Explorer this week, but the newest security patch, released last week, contains a bug that can cause a VBscript directive that previously worked to crash the browser.

Microsoft says Webmasters need to modify their pages not to use the directive.

That’s nice (I don’t use VBscript on this site) but there are embedded devices, such as HP’s JetDirect card, that use the directive. So early adopters of this patch may find themselves unable to do their jobs.

Better webmaster recommendation: Don’t use VBscript or ActiveX or other Microsoft-owned languages in your Web pages at all. Better end-user recommendation: Use Mozilla or a derivative instead of Internet Explorer.

Link

Recompiling Debian for your hardware. This thread comes up every so often, and with the popularity of Linux From Scratch and Gentoo, the appeal of a compiled-from-scratch Debian is undeniable. But does the small speed improvement offset the increased difficulty and time in upgrading?

The consensus seems to be that recompiling gzip, bzip2, and gnupg with aggressive options makes sense, as does recompiling your kernel. Recompiling XFree86 may also make some sense. But expending time and energy in the perfectly optimized versions of ls and more is foolhardy. (Especially seeing as speed demons can just get assembly language versions of them from www.linuxassembly.org.)

Link

A Guide to Debian. This is a guide, still incomplete, that gives a number of tips for someone who’s just installed Debian. The tips are applicable to other many other Linux (and even Unix) flavors as well.

Link

Spam. A coworker walked into my cube today and asked me how he could keep web robots from harvesting e-mail addresses from his web site. I found myself referring once again to the definitive piece on the subject, from Brett Glass (who gets my nomination for the greatest computer columnist of all time, for what that’s worth).

Link

The RULE project. A project has emerged to bring Red Hat Linux back to its roots, and allow it to run on older, less-powerful hardware.

From their site:


This install option is meant to benefit primarily two classes of users:

* GNU/Linux newbies who cannot afford modern computers, but still need, to get started more easily, an up to date, well documented distribution.
* System administrators and power users who have no interest in eye candy, and want to run updated software on whatever hardware is available, to minimize costs, or just because it feels like the right thing to do.

I love their FAQ. Check this out:


1.0 Hardware is so cheap today, why bother?

1. This is a very limited and egoistic attitude. Eigthy per cent of the world population still has to work many months or years to afford a computer that can run decently the majority of modern, apparently “Free” software.
2. Many people who could afford a new computer every two years rightly prefer to buy something else, like vacations, for example…. Hardware should be changed only when it breaks, or when the user’s needs increase a lot (for example when one starts to do video editing). Not because “Free” Software requires more and more expensive hardware every year.

These guys have the right idea. I can only hope their work will influence other Linux distributions as well.

Link

Linux uptime. (Sure, a little original content.) When I was rearranging things months ago, I unplugged the keyboard and monitor from my webserver, then I never got around to plugging them back in because I didn’t have to do anything with it.

The other day, I had occasion to plug a keyboard and mouse back into it. I went in, did what I wanted to do, then out of curiosity I typed the uptime command. 255 days, it told me. In other words, I haven’t rebooted since last May, which, as I recall, was about when I put the machine into production.

Linkfest Friday…

Let’s start things off with some links. Web development’s been on my mind the last few days. There’s a whole other world I’ve been wanting to explore for a couple of years, and I’ve finally collected the information that’ll let me do it.
Redirecting virus attacks — Your neighbor’s got Nimda? Here’s how to get his IIS server to quit harassing your Apache server. (Suggests redirecting to a bogus address; I’m inclined to redirect either to 127.0.0.1 or www.microsoft.com, personally.)

DJG’s help setting up MySQL. Apache, MySQL and PHP are a fabulous combination, but bootstrapping it can be a painful process. People talk about writing a sendmail.cf file as their loss of innocence, but I’ve written one of those and I’ve tried to set up the LAMP quartet. The sendmail.cf file was easier because there’s a whole lot more written about it.

Short version: Use Debian. Forget all the other distributions, because they’ll install the pieces, but rarely do they put the conduits in place for the three pieces to talk. It’s much easier to just download and compile the source. If that doesn’t sound like fun to you, use Debian and save some heartache. If you’re stuck with the distro you have, download ApacheToolbox and use it. You’ll probably have to configure your C/C++ compiler and development libraries. That’s not as bad as it sounds, but I’m biased. I’ve compiled entire distributions by hand–to the point that I’ve taken Linux From Scratch, decided I didn’t like some of the components they used because they were too bloated for me, and replaced them with slimmer alternatives. (The result mostly worked. Mostly.) You’ve gotta be a bit of a gearhead to take that approach.

Debian’s easier. Let’s follow that. Use this command sequence:

apt-get install apache
apt-get install php4-mysql
apt-get install mysql-server

Next, edit /etc/apache/httpd.conf. There’s a commented-out line in there that loads the php4 module. Uncomment that. Just search for php. It’ll be the third or fourth instance. Also, search for index.html. To that line, add the argument index.php. If you make index.php the first argument, access to PHP pages will be slightly faster. Pull out any filetypes you’re not using–if you’ll never make an index page called anything but index.html or index.php, pull the others and Apache will perform better.

Got that? Apache’s configured. Yes, the php installation could make those changes for you. It doesn’t. I’m not sure why. But trust me, this is a whole lot less painful than it is under Red Hat.

But you’re not ready to go just yet. If you try to go now, MySQL will just deny everything. Read this to get you the rest of the way.

Once you’ve got that in place, there are literally thousands of PHP and PHP/MySQL apps and applets out there. If you can imagine it, you can build it. If HTML is a 2D world, PHP and MySQL are the third and fourth dimension.

Am I going to be playing in that world? You’d better believe it. How soon? It depends on how quickly I can get my content whipped into shape for importing.

This is the holy grail. My first editing job was doing markup for the Digital Missourian, which the faculty at the University of Missouri School of Journalism believe was the first electronic newspaper (it came into being in 1986 or so). By the time I was working there in the late summer of 1995, it had been on the ‘Net for several years. About eight of us sat in a room that was originally a big storage closet, hunched in front of 486s, pulling stories off the copydesk, adding HTML markup, and FTPing them to a big Unix cluster on the MU campus. We ran a programmable word processor called DeScribe, and we worked out some macros to help speed along the markup.

No big operation works that way anymore. There aren’t enough college students in the world. You feed your content to a database, be it Oracle or IBM DB2 or Microsoft SQL Server or MySQL or PostgresSQL. Rather than coding in straight HTML, you use a scripting language–be it PHP or ASP–that queries the database, pulls the content, applies a template, and generates the HTML on the fly. The story goes from the copy editor’s desk to the Web with no human intervention.

There are distinct advantages to this approach even for a small-time operation like me. Putting the content in a database gives you much more versatility. Some people want overdesigned Web sites. Some want something middle-ground, like this one. Others want black text on a gray background like we had in 1994. You can offer selectable formats to them. You can offer printer-friendly pages. You can even generate PDFs on the fly if you want–something some sites are doing now in an effort to gain revenue. If you have content from various sources, you can slice and dice and combine it in any imaginable way.

I can’t wait.

Optimizing a Linux box in-place

Here’s the Linux bit I promised yesterday. I wrote it much earlier, so I might as well throw it out there.
Our test firewall at work is an old Pentium-200 running Red Hat Linux and a commercial firewall app. (No, I won’t disclose which one. Security, you know.) It’s a bit slow. A P200 is severe overkill for the firewall built into the Linux kernel (Steve DeLassus and I made a firewall out of the first PC he ever bought, a 486SX/20 of 1992 vintage, which, save the loss of the original power supply in an electrical storm, has never required any service), but this commercial package does a lot more than the simple firewalls built into Unixish kernels do.

It had 72 megs of RAM in it and swapped mercilessly. Its speed seemed to be OK once it was booted, but seeing as this is a testbed, it tends to get rebooted an awful lot. I needed to do something for it.

So I trekked into the PC graveyard to see what I could dig up. I found a Compaq 386DX/20. I left that alone. That’ll be useful if I ever need to pillage a pair of Compaq drive rails, which has happened before. Unfortunately those rails are worth more than the rest of the computer. I also spotted a Mac SE. That’ll be handy if I ever need a doorstop. Then I found a Pentium-75 and another Pentium of unknown speed. I opened them up. The 75 had a pair of 16-meg sticks. I opened up the unknown Pentium and looked inside. Ugh. Socket 4. That meant it was a Pentium-60, or, at best, a Pentium-66. It had a pair of 8-meg sticks.

I pulled the memory sticks out of the 75. The 60 didn’t have anything usable in it, save a pair of hard drives, both 540 megs, one a Quantum and the other a Seagate. I took the Seagate because it was easier to unbolt. I don’t have any way of knowing at this late date which of those drives was the better performer, and it probably doesn’t make much difference anymore.

The idea was to add some memory, and put in a second hard drive dedicated to virtual memory. Since the likelihood of the machine needing to read data from a drive and simultaneously hit virtual memory was fairly high, I wanted the virtual memory on its own drive. Furthermore, Linux’s partition-read
mechanism isn’t terribly efficient. This doesn’t matter for SCSI drives, which re-order I/O events, but for IDE drives it matters a lot. So getting the swap partition onto a dedicated drive was likely to improve performance a fair bit. (If this were a production system, it would probably have a SCSI
drive in it.)

So I swapped in the 16s for the 4s and found an empty bay to hold the 540, which I put on the second IDE channel as master (another performance trick), and booted Linux. The next trick is to use your favorite disk partitioning tool (I like cfdisk, but I can navigate plain old fdisk) to blow away whatever partition is on the new drive (this one was /dev/hdc) and create a single partition. I just made it the size of the drive, since 2.4 can deal with large swap partitions and Linux is smart enough to use whatever virtual memory it needs, not just automatically use all it has available. Then I set
it to type 82. Linux can do swapfiles, but a filesystemless dedicated swap partition gives better performance.

Next, I edited /etc/fstab. I found an entry for the swap partition pointing at /dev/hda2. I changed that to /dev/hdc1. That means I now have a small swap partition just sitting on the first drive unused, but that’s not a big deal to me. The system’s not using the disk space it has. While I was there, I noticed the CD-ROM drive was pointing at /dev/cdrom. I asked Charlie, our Unix/Linux guru, if Red Hat had some intelligence I didn’t know about. He said /dev/cdrom was just a symlink. I changed the entry to read /dev/hdd, which is where the CD-ROM drive ended up after my shuffle. Better to just code things directly than try to track symlinks, in my estimation.

Next, I issued the command mkswap /dev/hdc1 to initialize the swap partition. Then I rebooted and listened.

Indeed, during boot, the second drive was getting activity. I logged in and ran top, then hit shift-M to have a look at memory usage. The firewalling software was eating up a lot. But swap usage was down.

I decided to try cutting memory usage down a little more. I loaded /etc/inittab into vi. Red Hat by default gives you six virtual consoles. This machine has little need for more than two. Pulling the extras saves you a couple of megs. Near the end of the file you’ll see several lines that look something like this:

1:2345:respawn:/sbin/mingetty 38400 tty1

I commented out the last four of those. Hit the i key to put vi in insert mode, scroll down to those lines, add a # to the beginning of them, then hit ESC, then hit ZZ (shift-Z twice) to rapidly save the file, no questions asked. (I know, vi ain’t friendly, but it’s there.)

Then I had a look at /etc/rc3.d to see what daemons were running. I found apmd, sendmail, and gpm running. That was a waste of a couple megs, not to mention a possible security risk. I vaguely remember all three of them having had security issues in the past, and sendmail is one of those programs that should never be running unless you need it. Yes, this machine’s just practice, but Hall of Fame catcher Johnny Bench found that if he got sloppy and just let wild pitches go while he was warming up pitchers, he wasn’t as sharp at blocking potential wild pitches during the game when
it counted. So he worked just as hard during practice as he did during the game. Now he’s considered the greatest catcher of all time.

So I applied the Johnny Bench principle and disabled them with the following command sequence:

mv /etc/rc3.d/S26apmd /etc/rc3.d/K26apmd
mv /etc/rc3.d/S80sendmail /etc/rc3.d/K80sendmail
mv /etc/rc3.d/S85gpm /etc/rc3.d/K85gpm

I rebooted to find memory usage down by about 4 megs and the system booted a little faster. It was also more secure.

Total downtime: About 45 minutes.

That was time well spent. I may end up having to just bite the bullet and get some memory, but the system will perform better with these changes no matter how much memory is in it. And, more importantly, performing this exercise made me notice something I hadn’t noticed before. It let me tighten up security.

Had I blindly just ordered some memory to put in the system, or a new PC, like some people unfortunately advocate, I wouldn’t have necessarily noticed that as quickly.


Speaking of Linux, I did finally get Apache, PHP, and MySQL all talking together on my church’s 486. I used phpWeblog, which is an awfully nice package. Pages load in an acceptable two seconds. I notice the machine is paging, so a little more memory will probably help that. It’s amazing that people are throwing away Pentium-class machines when even a 486 has enough power to be a decent intranet server.

Not everyone’s so fortunate as you and me. Give ’em to someone who can use them if you don’t want them.

Is Windows optimization obsolete?

I read a statement on Bob Thompson’s website about Windows optimization, where he basically told a reader not to bother trying to squeeze more speed out of his Pentium-200, to spend a few hundred bucks on a hardware upgrade instead.
That’s flawed thinking. One of the site’s more regular readers responded and mentioned my book (thanks, Clark E. Myers). I remember talking at work after upgrading a hard drive in one of the servers last week. I said I ought to put my 10,000-rpm SCSI hard drive in a Pentium-133, then go find someone. “You think your Pentium 4 is pretty hot stuff, huh? Wanna race? Let’s see who can load Word faster.” And I’d win by a large margin. For that matter, if I were a betting man I’d be willing to bet a Pentium-200 or 233 with that drive would be faster than a typical P4 for everything but encoding MP3 audio and MP4 video.

Granted, I’ve just played into Thompson’s argument that a hardware upgrade is the best way to get more performance. An 18-gig 10K drive will run at least $180 at Hyper Microsystems, and the cheapest SCSI controller that will do it justice will run you $110 (don’t plug it into anything less than an Ultra Wide SCSI controller or the controller will be the bottleneck), so that’s not exactly a cheap upgrade. It might be marginally cheaper than buying a new case, motherboard, CPU and memory. Marginally. And even if you do that, you’re still stuck with a cruddy old hard drive and video card (unless the board has integrated video).

On the other hand, just a couple weekends ago I ripped out a 5400-rpm drive from a friend’s GW2K P2-350 and replaced it with a $149 Maxtor 7200-rpm IDE drive and it felt like a new computer. So you can cheaply increase a computer’s performance as well, without the pain of a new motherboard.

But I completely and totally reject the hypothesis that there’s nothing you can do in software to speed up a computer.

I was working on a computer at church on Sunday, trying to quickly burn the sermon onto CD. We’re going to start recording the sermon at the 8:00 service so that people can buy a CD after the 10:45 service if they want a copy of it. Since quality CDs can be had for a buck in quantity, we’ll probably sell discs for $2, considering the inevitable wear and tear on the drives. Today was the pilot day. The gain was set too high on the audio at 8:00, so I gave it another go at 10:45.

That computer was a Pentium 4, but that Pentium 4 made my Celeron-400 look like a pretty hot machine. I’m serious. And my Celeron-400 has a three-year-old 5400-rpm hard drive in it, and a six-year-old Diamond video card of some sort, maybe with the S3 ViRGE chipset? Whatever it is, it was one of the very first cards to advertise 3D acceleration, but the card originally sold for $149. In 1996, for 149 bucks you weren’t getting much 3D acceleration. As for its 2D performance, well, it was better than the Trident card it replaced.

There’s nothing in that Celeron-400 worth bragging about. Well, maybe the 256 megs of RAM. Except all the l337 h4xx0r5 bought 1.5 gigs of memory back in the summer when they were giving away 512-meg sticks in cereal boxes because they were cheaper than mini-frisbees and baseball cards (then they wondered why Windows wouldn’t load anymore), so 256 megs makes me look pretty lame these days. Forget I mentioned it.

So. My cruddy three-year-old Celeron-400, which was the cheapest computer on the market when I bought it, was outperforming this brand-new HP Pentium 4. Hmm.

Thompson says if there were any settings you could tweak to make Windows run faster, they’d be defaults.

Bull puckey.

Microsoft doesn’t give a rip about performance. Microsoft cares about selling operating systems. It’s in Microsoft’s best interest to sell slow operating systems. People go buy the latest and worst greatest, find it runs like a 1986 Yugo on their year-old PC, so then they go buy a Pentium 4 and Microsoft sells the operating system twice. Nice, isn’t it? After doing something like that once, people just buy a new computer when Microsoft releases a new operating system. Or, more likely, they buy a new computer every second time Microsoft releases a new operating system.

Microsoft counts on this. Intel counts on this. PC makers count on this. Best Bait-n-Switch counts on this. You should have seen those guys salivating over the Windows 95 launch. (It was pretty gross, really, and I didn’t just think that because I was running OS/2 at the time and wasn’t interested in downgrading.)

I’ve never had the privilege of working for an employer who had any money. Everywhere I’ve worked, we’ve bought equipment, then run it until it breaks, then re-treaded it and run it until it breaks again. Some of the people I work with have 486s on their desks. Not many (fortunately), but there are some. I’ve had to learn how to squeeze the last drop of performance out of some computers that never really had anything to offer in the first place. And I haven’t learned much in the past since I started my professional career in Feb. 1997, but I have learned one thing.

There’s a lot you can do to increase performance without changing any hardware. Even on an old Pentium.

First things first. Clean up that root directory. You’ve probably got dozens of backup copies of autoexec.bat and config.sys there. Get them gone. If you (or someone else) saved a bunch of stuff in the root directory, move it into C:My Documents where it belongs. Then defrag the drive, so the computer gets rid of the phantom directory entries. You’ll think you’ve got a new computer. I know, it’s stupid. Microsoft doesn’t know how to write a decent filesystem, and that’s why that trick works. Cleaning up a crowded root directory has a bigger effect on system performance than anything else you can do. Including changing your motherboard.

2. Uninstall any ancient programs you’re not running. Defrag afterward.

3. Right-click your desktop. See that Active Desktop crap? Turn it off. You’ll think you’ve got a new computer.

4. I am not making this up. (This trick isn’t in the book. Bonus.) Double-click My Computer. Go to Tools, Folder Options. Go to Web View. Select “Use Windows Classic Folders.” This makes a huge difference.

5. Turn off the custom mouse pointers you’re using. They’re slowing you down. Terribly.

6. Download and run Ad Aware. Spyware DLLs kill your system stability and speed. If you’ve got some spyware (you never know until you run it), Ad Aware could speed you up considerably. I’ve seen it make no difference. And I’ve seen it make all the difference in the world. It won’t cost you anything to find out.

7. Remove Internet Explorer. It’s a security risk. It slows down your computer something fierce. It’s not even the best browser on the market. You’re much better off without it. Download IEradicator from 98lite.net. It’ll remove IE from Win95, 98, ME, NT, and 2K SP1 or lower. If you run Windows 2000, reinstall, then run IEradicator, then install SP2 (or SP3 if it’s out by the time you read this). Then install Mozilla, or the lightweight, Mozilla-based K-Meleon instead. Need a lightweight mail client to replace Outlook Express? Give these a look. Run Defrag after you remove IE. You won’t believe how much faster your computer runs. Trust me. An Infoworld article several years back found that removing IE sped up the OS by as much as 15 percent. That’s more than you gain by moving your CPU up one speed grade, folks.

8. Reinstall your OS. OSs accumulate a lot of gunk, and sometimes the best thing to do is to back up your My Documents folder, format your hard drive, and reinstall your OS and the current versions of the apps you use. Then do all this other stuff. Sure, it takes a while. But you’ll have to do it anyway if you upgrade your motherboard.

9. Get a utilities suite. Norton Speed Disk does a much better job of defragmenting your hard drive than Windows’ built-in tool. It’s worth the price of Norton Utilities. Good thing too, because 90% of the stuff Norton Utilities installs is crap. Speed Disk, properly run, increases your disk performance enough to make your head spin. (The tricks are in the book. Sorry, I can’t give away everything.)

10. Get my book. Hey, I had to plug it somewhere, didn’t I? There are 3,000 unsold copies sitting in a warehouse in Tennessee. (O’Reilly’s going to get mad at me for saying that, so I’ll say it again.) Since there are 3,000 unsold copies sitting in a warehouse in Tennessee, that means there are about 3,000 people who don’t need to buy a new computer and may not know it. I don’t like that. Will there be an updated version? If those 3,000 copies sell and I can go to a publisher and tell them there’s a market for this kind of book based on the 2002 sales figures for my last one, maybe. Yes, there are things that book doesn’t tell you. I just told you those things. There are plenty of things that book tells you that this doesn’t. It’s 260 pages long for a reason.

Recent Microsoft OSs are high on marketing and low on substance. If Microsoft can use your computing resources to promote Internet Explorer, MSN, or anything else, they’ll do it. Yes, Optimizing Windows is dated. Spyware wasn’t known to exist when I wrote it, for instance. Will it help? Absolutely. I stated in that book that no computer made in 1996 or later is truly obsolete. I stand by that statement, even though I wrote it nearly three years ago. Unless gaming is your thang, you can make any older PC run better, and probably make it adequate for the apps you want to run. Maybe even for the OS you want to run. And even if you have a brand-new PC, there’s a lot you can do.

Like I said, I’d rather use my crusty old Celeron-400 than that brand-new P4. It’s a pile of junk, but it’s the better computer. And that’s entirely because I was willing to spend an hour or two cleaning it up.

Ho-hum.

Another day, another Outlook worm. Tell me again why I continue to use Outlook? Not that I ever open unexpected attachments. For that matter, I rarely open expected ones–I think it’s rude. Ever heard of cut and paste? It’s bad enough that I have to keep one resource hog open to read e-mail, so why are you going to make me load another resource hog, like Word or Excel, to read a message where the formatting doesn’t matter?
The last couple of times I received Word attachments that were important, I converted them to PDFs for grins. Would you believe the PDFs were considerably smaller? I was shocked too. Chances are there was a whole lot of revisioning data left in those documents–and it probably included speculative stuff that underlings like me shouldn’t see. Hmm. I guess that’s another selling point for that PDF-printer we whipped up as a proof of concept a couple of weeks ago, isn’t it? I’d better see if I can get that working again. I never did get it printing from the Mac, but seeing as all the decision-makers who’d be using it for security purposes use PCs, that’s no problem.

I spent the day learning a commercial firewall program. (Nope, sorry, won’t tell you which one.) My testbed for this thing will be an old Gateway 2000 box whose factory motherboard was replaced by an Asus SP97 at some point in the past. It’s got 72 megs of RAM. I put in an Intel Etherexpress Pro NIC today. I have another Etherexpress Pro card here that I’m bringing in, so I’ll have dual EEPros in the machine. The firewall has to run under Red Hat, so I started downloading Red Hat 7.2. I learned a neat trick.

First, an old trick. Never download with a web browser. Use the command-line app wget instead. It’s faster. The syntax is really simple: wget url. Example: wget http://www.linuxiso.org/download/rh7.2-i386-disc1.iso

Second trick: Download your ISOs off linuxiso.org. It uses some kind of round-robin approach to try to give you the least busy of several mirrors. It doesn’t always work so well on the first try. The mirror it sent me to first was giving me throughput rates that topped out at 200KB/sec., but frequently dropped as low as 3KB/sec.Usually they stayed in the 15MB/sec range. I cancelled the transfer (ctrl-c) and tried again. I got a mirror that didn’t fluctuate as wildly, but it rarely went above the 20MB/sec. range. I cancelled the transfer again and got a mirror that rarely dropped below 50MB/sec and occasionally spiked as high as 120MB/sec. Much better.

Third trick (the one I learned today): Use wget’s -c option. That allows wget to resume transfers. Yep, you can get the most important functionality of a download manager in a 147K binary. It doesn’t spy on you either. That allowed me to switch mirrors several times without wasting the little bit I’d managed to pull off the slow sites.

Fourth trick: Verify your ISOs after you download them. LinuxISO provides MD5 sums for its wares. Just run md5sum enigma-i386-disc1.iso to get a long 32-character checksum for what you just downloaded. If it doesn’t match the checksum on the site, don’t bother burning it. It might work, but you don’t want some key archive file (like, say, the kernel) to come up corrupt. Even though CD-Rs are dirt cheap these days and high-speed burners make quick work of them, there’s still no point in unnecessarily wasting 99 cents and five minutes on the disc and half an hour on a questionable install.

As for downloading the file in separate pieces like Go!Zilla does, there’s a command-line Linux program called mget that does it, but it doesn’t follow redirection and it doesn’t do FTP except through a proxy server, so I have a hard time recommending it as a general-purpose tool. When it works, it seems to work just fine. You might try mget, but chances are decent you’ll end up falling back on wget.