A kids’ game

The Philadelphia Phillies have one of the brightest futures in the National League. Sure, the Mets and the Braves grab all the attention. But look at them. They’re old. The Mets have Mo Vaughn and Roberto Alomar and Mike Piazza, and all of them are probably still in their prime, but they only have a couple more years of prime left. The Braves have Tom Glavine and Greg Maddux and Gary Sheffield, but that’s indicative of the same problem.
The Phillies are loaded with young stars. The Phillies once had a better third baseman than Scott Rolen. His name was Mike Schmidt. I can only think of two third basemen in the history of the game who deserve to be mentioned in the same breath as Schmidt. In about 15 years, Rolen looks to join them. And the Phillies have a great young catcher in Mike Lieberthal and a great young outfield in Doug Glanville and and Pat Burrell and Bobby Abreu. They also have one of the best young shortstops in the game in Jimmy Rollins.

The Phillies’ payroll is going to be $60 million this year. And Rolen, surrounded by these young stars, questions the Phillies’ ability or commitment to win. At the end of the year, he’s out of there.

The Phillies’ strategy should be really simple. Let these young stars get a little better, sign them to the longest-term contracts they’ll take, and play as hard as possible for two years, knowing they’ll probably finish in third place with a winning record, all the while waiting for the Mets and Braves to fall over. If everything were to stay the same, in three years the Phillies would no longer be the third-best team in their division. They’d cruise right past the gray-headed Mets and Braves.

But nobody really knows what the Phillies are going to do. In the past, when they’ve developed minor stars, they’ve frequently traded them. The last time they won anything was 1993, but that was an old team. It’s hard to look to that team for a precedent to suggest what they’ll do now, because keeping their aging stars in the mid-1990s didn’t make much sense. It’s hard to look at the way the Phillies handled players like Mickey Morandini as well. Morandini was a minor star who faded fast. Rolen and Lieberthal are superstars. Future Hall of Famers even, maybe.

In any other sport, there wouldn’t be any question what to do. They’d lock in their six young stars and tell their fans to get ready to enjoy a dynasty. But baseball isn’t any other sport. There’s very little revenue sharing. And Philadelphia’s not a major market. The Yankees are going to spend twice as much as the Phillies spend this year. It’s hard to imagine Philadelphia not being a major market, I know, but that’s how things have become in this sport.

Twenty years ago, players used to express amazement at signing six-figure salaries to play a kids’ game. Today, baseball’s still a kids’ game. And the players have the maturity of children. So do the owners and the commissioner.

There’s a solution to this madness. Bob Costas wrote a short book about it two years ago. It’s short and simple enough that even a moron like Bud Selig could understand it. Today, things have only gotten worse. Fans read Costas’ book in droves and took it to heart, but few of the owners seem to have done so.

If Selig gets his way, the Twins and the Expos will fold at the end of this season. That won’t do anything to stop the same teams from making the postseason again and again. It’ll be the Braves, Mets, Diamondbacks and Cardinals in the NL postseason again this year. And probably the year after.

The Phillies will find that without a salary cap to keep salaries from artificially rising and without revenue sharing to give them their fair share (The Mets have to have someone to play, so why doesn’t the visiting team get half the revenue?) they won’t be able to afford to keep their players. Scott Rolen will test the free-agent waters at the end of this season. I expect he’ll sign with the Braves or the Red Sox. If he signs with the Braves, the Phillies will almost certainly dismantle, because there’s little difference between finishing third and finishing fifth, and it’s a lot cheaper to finish fifth.

And people will wonder what if. Except for Bud Selig and his buddy Carl Pohlad, who got what they wanted. They can just keep counting their money and complaining about how unprofitable baseball is.

Big trouble

Getting in trouble. At work, we use a content-filtering application called Websense to keep people from visiting sports sites and porn sites and checking their stocks at work. Prior to its installation, one of the most commonly visited sites in our firewall logs was ESPN.com. Well, I set off Websense this afternoon:

Status: The Websense category "Sports" is filtered.

URL: http://www.symantec.com/sabu/ghost/compatible_drives.html

As you can pretty clearly see from the URL, I was wanting to see if the CD-R drive we have is compatible with Ghost 7.5. Websense didn’t see it that way.

I printed that message out and hung it on my cubicle wall. That’s what we do with bizarre and amusing Websense messages.

So I just had to do a little research. It would appear that Sabu is the name of a professional wrestler. I learn something new every day. But that raises the debate of whether professional wrestling is a sport. Websense and I disagree once again.

Hey, I never said I learn something useful every day…

And that leads me straight into this:

How I once almost accidentally stole a piano from some Mormons. It was my junior year of college, and I was living next door to the Lutheran church just off campus. I was walking out to my car, which was parked on the church parking lot, when a guy walked up to me.

“Can you get me into that church?” he asked, pointing over his shoulder with his thumb.

“Why do you need in the church?” I asked.

“I’m here to deliver a piano,” he said.

I had no idea what the church would want with a new piano, but seeing as I hadn’t set foot in the place all year, what did I know? I had a key for emergencies, and this seemed like one. “Hang on,” I said. “I’ll run in and get a key.”

So I came back out with a key, unlocked the door, and the guy wheeled the piano off his truck. “Any idea where they want this?” he asked as he wheeled it through the door.

Seeing as I didn’t even know they were getting a piano, I definitely didn’t know where they wanted it.

“We’ll just leave it here in the Narthex,” I said. “That way Pastor will see it first thing when he walks in, and he can move it where he wants it.” (That’d teach him for not being there when a piano was due to be delivered.)

“This is 305 S. College Avenue, isn’t it?”

I paused. I didn’t know the church’s address off the top of my head, but seeing as I lived next door at 206 S. College Ave., I knew the church’s address wasn’t an odd number. So I told him that.

“Where else is there a church on College Avenue?” he asked me.

There was none. I racked my brain for a minute. “Let me step outside and see what the building number is.” This was Columbia, after all. Maybe they did put even- and odd-numbered buildings on the same side of the street, for all I knew. They do everything else screwy in that town. Then a thought hit me out of the blue. “I wonder what the address of that Mormon thing across the street is?”

So I peered across the street at our squarish, utilitarian-styled neighbor. “Institute of Religion. Church of Jesus Christ of Latter-Day Saints,” the sign read. Then I looked for a building number. Indeed, it was the address the piano delivery guy was looking for.

He thanked me and wheeled the piano out the door and back into his truck.

I locked the door back up, then went back inside to put the key away. “Have I ever got a story for you,” I said to the first guy I spotted.

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 Ars Technica 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.

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