Promise, not powerhouse

I went to a fund-raiser at St. John’s Lutheran Church in Ellisville, Mo., last night. St. John’s is known as the Lutheran Megachurch. Last year it made a list (I forget the source) of 200 outstanding Protestant churches in the United States.
St. John’s does just about everything my home church, Faith Lutheran in Oakville, Mo., does, but it generally does it bigger and better because it has more people and more money. This was the church where I received a quickie crash course in video training about a year ago.

They pretty much blew me away. We’ve got some outstanding musicians at Faith, but St. John’s has dozens of outstanding musicians. On very special occasions we’ll write our own material at Faith (I co-wrote a song a couple of years ago with our now-departed music director) but they do this kind of thing all the time.

“Some day, some day,” I muttered to myself and to the seminary student I went with.

Yeah, I was impressed, but I’m not going to defect. Every time the thought even crosses my mind, a few lines I wrote to someone about four years ago come back. “Sincerity once was everything, and loyalty was absolutely priceless. But you wanted powerhouse, not promise, so now they’re not worth anything.”

I’m not that kind of guy. I’d rather take part in the building of something cool than just have it fall in my lap. There’s something about being able to watch it develop. And when it’s reached powerhouse status, you get the satisfaction of knowing you played a role–however small–in it getting there. Besides, I absolutely hate Manchester Road, which is the street where St. John’s is located.

I need to spend more time at St. John’s, so I may even make a trek up there a monthly thing. We need to learn from them. We’ve worked together in the past, but we ought to do that more.

Oddity of the day

This from Gatermann:

Um, why is your book selling for $55 at ebay and also the normal price? I found this while doing a search for your book to see if they had used copies for sale at Amazon and this popped up.

Then, on my own, I found this.

Yikes! $72.50!? I guess someone really likes it?

And you know what they say, if something saves you a lot of money, then it ought to cost a lot of money as well…

But seriously, it would appear that for some reason, someone’s decided the UK version (or perhaps some variant of the UK version that I’m unaware of) of the book is collectible. Who knows why. Maybe there was a small run with a misprint that was quickly corrected. I can’t imagine anyone collecting O’Reilly books, but I guess if people are going to collect computer books, O’Reilly has more mystique than most publishers.

It kind of makes me wonder what one of the tech-review copies would sell for. After all, there were only a half-dozen or so of those in existence (and even I don’t have one of those–I had it in PDF form). While not substantially different from what ended up on the shelves, there were changes.

Paying two or three times the cover price of a book published in 1999 seems, well, odd. Especially seeing as the book is still available.

I’ve e-mailed the book dealer to ask why that is, because now I’m really curious. Not to mention amused.

More Linux tricks

OK, I gotta tell this joke.
Osama bin Laden gets taken out by a daisy cutter. He’s standing up there at the pearly gates, where he’s met by George Washington. “You tried to harm the country I birthed!” he said. And he sucker-punched him.

“You tried to take Americans’ liberty, so they gave you death!” screamed Patrick Henry, who popped out of nowhere. Then he threw an anvil at him.

Thomas Jefferson and James Madison came out and started tag-teaming him, followed by 68 more freedom-loving Americans wielding assorted large and heavy objects.

Finally, John Randolph decided he’d had enough, so he picked up this bloody pulp that used to be bin Laden, and threw him over to the gate for his fiery judgment.

Bin Laden looks up at an angel standing there. “This isn’t the least bit like what I was promised!” he cried.

“I told you there’d be 72 Virginians waiting for you when you got here!” the angel said. “What’d you think I said, genius?”

Let’s talk about some Unix/Linux tricks. Since yesterday’s mention of top drew some positive response, I might as well talk briefly about a few more tricks.

First, the shell itself. If you can’t remember a command, type the first letter or two and hit the tab key twice. You’ll see all the possible combinations. Tab completion also saves you keystrokes and works on filenames too. Let’s say I’m editing /etc/apache/httpd.conf, here’s the key sequence I’ll probably end up using:

na[tab]/e[tab]apa[tab]h[tab]

It saves me more than half the keystrokes. It also lets me be lazy–as long as I remember roughly where the file is and what letter it starts with, I’ll find it quickly.

Steve DeLassus asked me once a couple of years ago why I didn’t use that trick. I said because I’d get addicted to it and hate not having it in Windows. Out of necessity I started using it. I hate Windows command prompts now.

If you want to see your disk usage, or how much space you have free, use the du and df commands. (I never have problems remembering that last one for some reason.)

If you need to see what’s inside your computer, remember the /proc subdirectory. This is Linux-specific, because each Unix variant has its own nuances about /proc. By viewing the file /proc/pci, you’ll get detailed information on the PCI devices in your computer. By viewing /proc/interrupts, you’ll find out what IRQs are in use and what’s sharing what. The /proc/scsi and /proc/ide trees will give you information on the disk subsystems. By poking around inside /proc, you can find out more about a PC than the old standby Norton Diagnostics for DOS used to tell you. Your Linux installation CD can be a valuable diagnostic tool–just boot a troublesome PC with it and hit ALT-F2 (or CTRL-ALT-F2 if it’s a distribution that uses a GUI-based installer) to switch to a console. Or use a single-floppy Linux distribution.

And as for learning this stuff, the only thing I can recommend is total immersion. I asked Charlie, our Unix sysadmin at work, how he learned Emacs. “I just set my edit variables to emacs and lived with it,” he said. “And after about a month I liked it.”

I think I’ll stick with nano or pico or joe or ee, personally. I know enough vi to be able to use it in an emergency. But his approach works for all things Unix. Either dual-boot the PC you have or pick up a cheap second PC. It’s not difficult to find an old Pentium, complete, for under $100 and a price pressure from cheap LCDs has had the nice side-effect of pushing the price of conventional CRT monitors way down. There’s enough good free Linux software out there now that you can live in Linux for long periods of time and still get the same things done in Linux that you would in Windows while you gain valuable and marketable skills.

While you’re at it, eat lots of salmon and blueberries (not necessarily together). They’re supposed to be good brain food, and that can’t hurt.

Once you’re starting to feel like you know something, pay IBM developerWorks a visit. They’ve got a certification prep series up there. You may not wish to spend the time and money to get certification, but by reading the series, you’ll get a good idea of what you know and don’t know, and you’ll learn some more good stuff in the process.

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.

Priorities (Or: How to spend Valentine’s night on the couch)

It’s that special time of year, when a man’s thoughts turn to…
Computers. Or other gadgets. Just like they always do. Men don’t need a Hallmark holiday to think about what they really want.

Steve DeLassus called me up the other night. He wanted to talk about tape drives and CD-RWs. He wanted to know if it was safe to buy an ATAPI CD-RW drive, or if he should buy SCSI. He knew about my terrible experiences with first-generation ATAPI CD-RWs. I burned as many coasters as I did successful discs, and in those days, a coaster was an expensive mistake.

I told him where to get Plextor CD-RWs for next to nothing (Newegg.com). Steve checked yesterday morning, but they were out of them, as it turns out. So Steve looked at Hyper Microsystems and found some good prices on Plextor units. Not earth-shattering like the deal I saw at New Egg a couple of weeks ago, but good. We had initially talked about 12X units. But the 16X unit was $4 more, and the 24X unit was $20 more than that. “You can ride that train all the way up to the $179 40X burner,” I said.

Steve hasn’t responded to that as I write this. Considering what I paid for my 2X burner in 1998, that $179 Plextor 40X unit is a steal.

But there’s something else to consider: The overhead in burning a disc. It takes the computer a little time to figure out the disc layout, and that speed is dependent on the host computer (and the software it’s running), not the burner. It didn’t seem like much time in the days of 2X burners, but compared to the three minutes it takes to lay down a mountain of data on the disc with a modern burner, it’s started to look significant. Secondly, it takes some time to close a disc. I haven’t taken a stopwatch to it, but the 12X unit I use in one of my offices at work seems to take about the same amount of time to close a disc as the 2X unit I use in another office. The 12X unit doesn’t burn a disc 6 times as fast as the clunky 2X unit. And the 24X unit definitely won’t be twice as fast as a 12X.

Since I don’t have all those burners and don’t have the time to make a scientific test, I went to CDRLabs.com to get some figures. Their testbed has changed over time–they keep it constant across drive generations, but the 12x unit was tested in a different system than the 40x unit, and they overclock. Storage Review’s methodology is much better. But the numbers are good enough to illustrate the point.

Results of burning 651 MB of data, along with the cost of the drive:
12x: 6:43 ($124)
16x: 5:11 ($129)
24x: 3:54 ($149)
40x: 3:26 ($175)

Even given the advantage of a faster computer and newer software, the 40x unit still can’t double the speed of the venerable 12x unit.

Why the diminishing returns? Constant Angular Velocity. Very high-speed burners use the same technique as high-speed readers, so you don’t get a constant 40x. The 40x drive starts out at 20x and steps up to 40x as it reaches the outside of the disc. The average writing speed is closer to 30x. Obviously, the less data you burn, the less the 40x drive will help you.

I also pointed out to Steve that there’s more to this than the hard dollar cost. It’s Valentine’s Day time, and there’s the wrath of the wife to deal with. There’s always a hidden cost involved, no matter what you’re buying, and sometimes it doesn’t have a whole lot to do with what you’re buying.

I could quote Proverbs 31:10 and say that a wife is a treasure and therefore you should always treat her as such, and therefore you should buy the $59 refurbished 8x drive for you, a $39 dozen roses for her, and–here’s the kicker–then spend $80 filling her car with flowers the week after Valentine’s Day, when your money buys three times as much. See? I’m a thinking man.

Then again, you can go for bragging rights and find yourself singing along with Dave:

That’s okay, hey hey hey, love songs bite anyway!

(In which case, you’ll probably find yourself spending Valentine’s night on the couch. Or on the porch. I can’t say I’ve ever experienced this, but I don’t think it would be very pleasant to be stuck out on the porch wearing something skimpy in Missouri in February.)

So, to recap, for those of you taking notes: Spending $179 on a 40x CD-RW drive for you and giving a home-made Valentine’s Day card to your wife will lead to very bad things.

Burning a CD full of sappy love songs and then bragging about how it only took four minutes to burn (the 40x drive doesn’t burn audio at full speed) won’t make it any better. Sorry.

But I seem to have gotten off the subject somehow.

As far as tape drives go, I can tell you that Quantum DLT tape drives rock because that’s all we use at work. They’re built like tanks and last forever. The tapes are cheap and take a lot of punishment. They back up at a rate of about 5 MB/sec, which makes them faster than the hard drives of 10 years ago. And they work fabulously with Seagate Backup Exec, which severely reduces headaches when people want stuff restored. Considering they start at about $3995, they’d better have something going for them.

Steve’s needs are a bit more modest. An 8-gig IDE Travan drive from the likes of Seagate is cheap. The tapes run about $30, but for the quantities of data Steve will be backing up (he and I both rely on CD-Rs for backups now) and the frequency at which he’ll be doing so, a drive and tapes designed for light duty ought to do fine. When it comes to tape drives, you can buy a cheap drive that uses expensive tapes, or an expensive drive that uses cheap tapes. A lesson most people have to learn quickly is that it’s much easier to get a cheaper drive past the glare of your wife or boss and then buy the more-costly media as you need them. Media’s an OK purchase. Hardware is bad.

That’s why Zip drives have been so successful, and why Iomega is still in business.

I think if Steve wants to spend Valentine’s night on the porch, he needs to buy a DLT drive, then take out a cash advance to make his first minimum payment.

Then he can gloat about how much money he’s saving on tapes.

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.

Asbestos underwear time

Thompson’s repeated assertion that my book is a waste of time isn’t shared by everyone. I don’t think it’s necessary to point out his self-contradictions, and it’s not necessary to state that his experience with one computer is statistically insignificant compared to my experience with hundreds. That said, I’ll just post some mail and shut up. I’ve got other business to tend to tonight. Friends who need things, plans to make. I’ll be back tomorrow with some Linux stuff.
From: Dan Bowman

…and that’s a nice piece on the old machines. I think I’ll have to say something about my work P-200 and Athena here at home,

dan

You can read his bit here.

From: Steve DeLassus

Nice post for Monday. I have to slightly disagree that MS doesn’t believe in programming for performance. They’ll program in just enough to keep the common user hooked and not try an alternate OS. They don’t want you to think that their new OS just ate up all of the “gains” you made by purchasing a CPU with more cycles (“more cycles = faster computer, right?”). The problem here is consumer education, and most consumers relate more raw compute power to better performance, not realizing that better *system design* means better performance.

From: John Lowell

Dave,

About a year ago, I e-mailed you introducing myself, attempting to engage you in a dialogue about something about which you seemed quite expert at the time. I never received even the courtesy of a reply. Looking at Bob Thompson’s website today, it would seem that one would have to count silence from you as a blessing.

John

For the record, I don’t remember Mr. Lowell’s mail. But considering the volumes of mail I sometimes receive, it’s not uncommon for one to fall through the cracks.

You can’t please everyone.

From: dsgp

I enjoyed your commentary. I’m the MIS at a joint that would still using IBM PS2 computers if we could get them to use Office 2000.

So, we do what we do with what we have. Robert, as well as Jerry, don’t have any problems getting the free stuff; ours cost us. So we build our own units and upgrade until the motherboards burn out.

Keep up the good info.

Carl

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.

PC slumming

Slumming. I spent a portion of the day Saturday messing around with an old 486-133. The DCE at church asked me what it would take to build an intranet. I said an old PC. So he handed me an old 486-133. I can’t shake this machine. I built this computer back in 1994 or so for a law firm. I performed several upgrades on it, including the 133 MHz upgrade (it started out as either a 33 or a 66, not sure which). Three years ago or so, when it was obsolete, the firm called me and asked me to haul it away. I asked my church if they wanted it. They did.
This 486-133 is available because it lost its old job to an old Pentium-200 I scrounged up and rebuilt. Trying to run anything more than a simple fileserver is pushing the limits of this machine. But I like pushing the limits. So I decided to see what I could do with it. I took it home and opened it up. Hmm, It had a 72-pin and 4 30-pin SIMM sockets free. I tried out an old 8-meg SIMM I had. It didn’t like it. I thought I remembered seeing some old 30-pin SIMMs laying around…. I found some. I put them in. It counted to 20. Nice.

I tried out a 420-meg HD I’d salvaged from somewhere or another. The system detected it as an 850. Curious. I disconnected the true-blue 850 in the box. It still detected the 420 as an 850. Mislabeled, perhaps? I’ve seen stranger things. So I started to install Linux. I was able to partition the drive, but then it emitted a click-o’-death when Debian tried to initialize the swap partition. So I did what I should have done in the first place. I took off the cover. Next time someone asks me how a hard drive works, I’ll be able to show them. So the 850 flew solo.

Then I added the last from a stash of old DEC Etherworks 3 NICs I had (one of my employer’s clients handed me a bag of them months ago and said, “Donate them to your cause.” I’ve been giving them away one by one ever since) and installed Debian 2.2. Debian installed a lot slower than it does on a Pentium.

I installed Squishdot. I found it could be tweaked to give a very professional look. I also found it horribly confusing because it’s so unlike any other content management tool I’ve used. I messed around with it for a long while, but it was slow. Really slow.

I tried some alternative kernels. No improvement to speak of. I added the noatime parameter to the root partition’s entry in /etc/fstab. That helped a little.

But still, it was swapping out and the CPU was topping out as well. The homepage was taking 18 seconds to load. That’s not good.

Apache serves up static Web pages just fine–no slower than any other computer. But this dynamic stuff might just be too much.

So as a last resort, I compiled a lo-fat kernel. I took 2.2.19 and basically answered no to all but the absolute essentials. Mouse? Forget it. I was half-tempted to leave out floppy support, but that would make maintenance a bit more difficult.

It’s unfortunate that I don’t have any matching pairs of SIMMs laying around. Otherwise I’d swap the board out for a Pentium-75. I’ve got a couple of ancient Socket 5 boards laying around, and at least one Pentium-75 CPU. I’ve got two mismatched 4s, but that’s asking for instability, and I’m not sure if a P75 with 8 megs is any improvement over a 486-133 with 20.

Compiles take a couple of hours. I really should have just compiled a .deb package on a faster machine and moved it over. It seems hard to believe that it wasn’t terribly long ago that a 486 was a perfectly workable computer, and now it feels like a PC/XT. But the 486’s heyday was 10 years ago now. And 20 years ago, the PC/XT wasn’t on the market yet, though its direct ancestor, the IBM PC, was. So I guess it’s not too unreasonable to regard this 486-133 as the Turbo XT of today.

A philosophy of life

A week or two ago, e-mail went out from one of our VMS administrators. He wanted to reboot one of our VMS systems.
Later in the day, our other VMS administrator sent out mail. He wanted to reboot one of our systems.

My boss responded to the second message:

NT guys, please find something to reboot. The VMS guys are catching up with you.

-Middle Management

A couple days later, we had to reboot one of our NT systems. We were talking about that at lunch. I looked across the table. “We’re ahead of you today,” I said.

“You’re ahead of us most days,” he laughed. Yes, NT’s not exactly the bastion of stability, while VMS is as stable as Unix.

“It’s not enough for us to win the war. We have to win every battle,” I said, punctuating every syllable of the last two words with my fist on the table.

I was being ridiculous. We all knew I was being ridiculous.

But I was talking to one of my friends tonight about something completely unrelated, and as I struggled with what we were talking about, I realized those words, and the sentiment behind them, permeate just about everything I do.

I’m not sure that’s such a good thing.