Don’t read this if you don’t want a cheap (under $200) DVD burner

Long ago, I used to hunt for killer prices on computer equipment, and when I’d find something good, I’d post it here. It seemed to be a fairly popular feature. I haven’t done that in a long time, mostly because I haven’t been in the market for anything.

Read more

My brief experience with a Proliant ML570 server

Last week, I built a Compaq HP Proliant ML570. Quad-CPU, 1.9 GHz Xeon, 2 gigs of RAM, and about 200 gigs’ worth of 10K RPM SCSI storage in two RAID arrays.
Yes, being one of the first people to see a $20,000 computer and being the one who gets to take it apart to install the optional add-ins is my idea of fun.

Opening it up shows this is a real, honest-to-goodness server, not just any old commodity motherboard slapped into a rack-mount chasis or a case with big casters on it. The memory is on a riser card. There are standby slots on the card, so that if as many as two DIMMs fail, the backups take over. The riser cards are hot-pluggable, but of course how the computer handles you hot-plugging the memory depends on the operating system.

Most of the PCI-X slots are also hot-pluggable. They’re 64-bit and run at 100 MHz.

Of course, the hard drives are hot-pluggable as well. Which brings up the RAID stuff. The drives are Ultra320 SCSI. There are two drive cages. The only Ultra320 RAID controller HP is currently offering (remember, this is May 2003 as I write) was a single-bus. Well, there’s a second bus, but it’s external.

If you put in two of these controllers, you get the full bandwidth of the bus but you can’t stripe across the buses, which you will probably want to do for performance, and almost certainly will have to do in the future for expansion. The only two-bus RAID controller HP was offering was an Ultra160. So we bought that. Under the best-possible circumstances, a single 15K RPM drive can’t quite deliver 80 MB per second. So with two of the newest 15K drives on an Ultra160 bus accessing the very front of the disk, you’d still have a little bandwidth to spare.

These particular Fujitsu 10K RPM disks deliver between 40 and 70 MB per second under optimal conditions. So the Ultra160 controller isn’t a huge liability. But we’ll be ordering more of these, and if HP delivers an Ultra320 controller that meets our needs, we’ll get one.

It runs Linux really, really fast. I compiled a kernel in about 4 minutes, without doing anything special to it. Linux was only on it for a few hours though, while I waited for its RAID controller to come in. Then I installed Windows 2000 and SQL Server 2000.

It’s nice. But with nearly 8 GHz worth of CPU power onboard, it had better be.

Optimizing a web server

Promises of better Apache performance have me lusting after lingerd, a very obscure utility that increases performance for dynamic content. It’s been used on a handful of little sites you might have heard of: Slashdot, Newsforge, and LiveJournal.
Unfortunately there’s no Debian package, which means compiling it myself, which means compiling Apache myself, which also means compiling PHP and MySQL, which means a big ol’ pain, but potentially better performance since I could go crazy on the GCC optimization flags. Hello, -O3 -march=i686!

And if I’m going to compile all that myself, I figure I might as well compile it all myself and get the high performance across the board and get GCC 3.2x into the picture for even better performance. The easy way to do that is with lfs-install, which builds a system based on Linux From Scratch. For workstations I’d rather use something along the lines of Gentoo, but for servers, LFS is small, mature, and reasonably conservative.

Supposedly metalog offers improved performance over the more traditional syslogd or sysklogd. The good news is that those who are more sane than me and sticking with Debian for everything can take advantage of a Debian package (at least in unstable), and just apt-get away.

If I have any sanity left, I’ll think about minit to replace SystemVInit and save me about 400K of memory in a process that’s always running, and fgetty to save me a little more. I’ve tried fgetty in the past without success; it turns out fgetty requires DJB’s checkpassword in order to work.

Keep in mind I haven’t tried any of this yet. But the plan sounds so good in my current sleep-deprived state I couldn’t help but share it.

Pretentious Pontifications: Tape drives

R. Collins Farquhar IV, Scotsman, and aristocrat. To all whom it may concern. Greeting: One of my associates contacted me today about tape backup units, specifically, a review on Tom’s Hardware Guide. As usual, Tom’s Hardware substantially misses the mark.
I was extraordinarily disappointed that Tom’s Hardware made no mention whatsoever about Intel tape drives. I had my manservant call one of my contacts at Intel for the purposes of having them send me a tape drive, but my contact said that Intel does not make tape drives. Since Intel is one of a very small number of reputable hardware manufacturers, this is the kind of important information that needs to be in a review like this.

I had my manservant ask my contact at Intel which tape drive he would recommend. He recommended the HP SDLT320. Since Intel has a very close relationship with HP, I decided that an HP tape drive might be the next best thing. The Intel contact mentioned–as did the THG review–that the Tandberg SDLT320 is an identical unit. Since I have never heard of Tandberg, I did not even consider it. Any operation I have never heard of is obviously a fly-by-night. Accepting a Tandberg when Intel recommends an HP is akin to accepting a mere Bentley when you sought a real Rolls. Whereas Jacques Pierre Cousteau Bouillabaise Nouveau Riche Croissant de Raunche de la Stenche will settle for a Bentley, I am never willing to settle for a knockoff, even when the alleged difference is only in the front plate or grille.

I was also extraordinarily disappointed that Tom’s Hardware did not test the drives with Microsoft software. Microsoft, as even a tryo or ingenue knows, makes simply the finest software in the world. I would go so far as to call Microsoft the Rolls-Royce of software. So my manservant contacted Microsoft to ask for a copy of their top-flight tape backup software. The Microsoft representative said that Microsoft’s offering came bundled with its server software and is licensed by Veritas. If I wanted something better, I should talk to Veritas. Again, doing so would be to settle for something less than a Rolls. Even though a Rolls from the 1960s used a General Motors transmission, I would never settle for a 1968 Cadillac when what I really want is a 1968 Rolls. I have never heard of Veritas either, so I evaluated Microsoft’s offering and found it to be first-class and worthy of performing the backup needs of any enterprise. That Microsoft would be so generous as to bundle such a grandee application with its server software makes it all the more sweet for those whose means are less aristocratic than my own.

I was pleased when I connected the HP SDLT320 to my main workstation (a prototype 4 GHz Pentium 4 I got from Intel) that my Quake 3 framerates rose to 430 FPS. A serious gamer will want this.

Next, I tried backing up my Quake III CD to the HP SDLT320. I was amazed when the backup took a mere two minutes. I do not know whether to attribute these results to the influence of Intel engineers on HP, or to Microsoft’s sterling software. In all likelihood, it is a combination of both.

These tests prove once again the adage that corporations sufficiently large truly can do no wrong.

How DOS came to be IBM’s choice of operating system

The urban legend says Gary Kildall snubbed the IBM suits by making them wait in his living room for hours while he flew around in his airplane, and the suits, not taking it well, decided to cut him out of the deal and opted to do business with Bill Gates and Microsoft, thus ending Digital Research’s short reign as the biggest manufacturer of software for small computers.

Read more

Microsoft’s Slammer pain is good for everybody

SQL Slammer hit where it counts, including HP–historically, one of the biggest Microsoft supporters around–and Microsoft itself.
This is good. Really good.

Microsoft is one of its own biggest customers. Part of this is due to one of the worst cases of not-invented-here syndrome in the industry, and part of it is marketing. If Microsoft can run its enterprise on mostly its software, its argument that you ought to be able to run all of yours on it is much stronger.

When Microsoft feels our pain, that’s good. Problems generally get fixed. Not necessarily the way we want them fixed, but fixed. When Microsoft for whatever reason doesn’t feel our pain, things languish. Witness the development of Windows 9x late in its lifecycle, after Microsoft was able to run everything internally, including laptops, on Windows 2000. While Windows 98SE was fairly good, all things considered, Windows Me was so horrid that one of my magazine editors wrote me and asked me the least painful way to escape it. Windows Me was fast, but it was less stable than 98SE.

What happened? The patches were difficult to install, poorly tested, poorly documented, and it was extremely difficult to know when you needed them. Microsoft’s inability to keep its own servers sufficiently patched illustrates this.

Several things are likely to happen now. People will take non-Microsoft solutions more seriously and, in some cases, deploy them. A not-as-homogenous Internet is good for everybody. Meanwhile, Microsoft will be cleaning up its act, making it easier to ensure that their patches actually work and can be deployed with reasonable ease.

I still think we’ll have disasters like SQL Slammer again. But this is a good step in the right direction.

More changes on the way

I’m playing with b2 0.61, which comes very close to feature parity with Movable Type. The only thing MT has that made me jealous that this newest version of b2 doesn’t is allowing multiple categories per post, which is something. I remember a Ted Williams tribute I wrote after he died that someone told me belongs in “human interest” rather than “baseball”–permitting multiple categories neatly fixes that problem.
But pingbacks and trackbacks are there, so I can interact with other blogs and they can interact with me, which is good.

On another front, I’ve managed to pull down all of my old content from editthispage.com (October 2000-April 2001), which Steve DeLassus and I are trying to massage into a form suitable for importing here. I did it in a very crude fashion–I set my display preferences to display 365 entries on the front page, then I downloaded my page with wget and I manually stripped out the obvious cruft. Very inelegant but it mostly works.

As for the custom b2 code Steve wrote, I’m getting closer to getting it into a form that’s distributable. The PHP calendar he modified for my use is history, replaced with one by Alex King that integrates more nicely with the rest of b2 and follows Mark Pilgrim’s accessibility guidelines nicely.

The low-end server

Here’s a good question: What should a small operation do when it gets fed up with its network and is tempted to just chuck it all and start over?
Well, my advice is to start over. But I don’t agree that starting over requires one to chuck everything.

We’ll start with the server. Chances are, these days, you need one. If you’re doing Web and e-mail, you absolutely need one. But to a lot of people, servers are a mystical black box that costs more money than a desktop PC but runs a similar operating system. And that’s all they know.

Here’s what you need to know: A corporate server is built to stricter tolerances than a desktop PC and sometimes uses higher-quality parts (common examples are ServerWorks chipsets instead of Intel chipsets, SCSI instead of IDE, and error-correcting memory instead of the cheap nonparity stuff). You also often get niceties like hot-swap drive cages, which allow you to add or replace hard drives without powering down or opening the case.

They’re generally also better tested, and you can get a support contract on them. If you’re running an enterprise with hundreds or thousands of people relying on your server, you should buy server-grade stuff, and building your own server or repurposing a desktop PC as a server ought to be grounds for dismissal. The money you save isn’t worth it–you’ll pay more in downtime.

But a dozen people won’t hit a server very hard. This Web site runs on a Dell OptiPlex Pentium II/450 workstation. A workstation is a notch above a desktop PC but a notch below a server, in the pecking order. The biggest difference between my Optiplex and the PC that was probably sitting on your desk at work a year or two ago is that my Optiplex has a SCSI hard drive in it and it has a 3Com NIC onboard.

A small office can very safely and comfortably take a reasonably powerful name-brand PC that’s no longer optimal for someone’s desk (due to an aging CPU) and turn it into a server. A Pentium II-350 or faster, outfitted with 256 MB of RAM, a SCSI host adapter and a nice SCSI hard drive, and a 3Com or Intel 100-megabit Ethernet card will make a fine server for a couple of dozen people. (My employer still has a handful of 200 MHz Pentium Pro servers on its network, serving a couple hundred people in some cases.)

This server gets hit about as hard as a typical small business or church office server would. So far this month I’ve been getting between 500 and 550 visitors per day. I’ve served about 600 megabytes’ worth of data. My average CPU usage over that time period is in the single digits. The biggest bottleneck in this server is its 7200-rpm SCSI disk. A second disk dedicated to its database could potentially speed it up. But it’s tolerable.

Hot swappable hard drives are nice to have, but with an office of a dozen people, the 5-10 minutes it takes to power down, open the case, swap drives, and close the case back up and boot again probably doesn’t justify the cost.

A business or church office that wanted to be overly cautious could buy the very least expensive sever it can find from a reputable manufacturer (HP/Compaq, Dell, IBM). But when you do that, you’re paying for a lot of power that’s going to sit there unused most of the time. The 450 MHz CPU in this box is really more than I need.

Jeremy Hendrickson e-mailed me asking about whether his church should buy a new server, and whether it really needed two or three servers, since he was talking about setting up a Samba server for file serving, Apache for Web serving, and a mail server. Running file and Web services on the same box won’t be much of a problem. A dozen people just won’t hit the server that hard. You just make sure you buy a lot of disk space, but most of that disk space will go to file serving. The database that holds all of the content on this site is only a few megabytes in size. Compressed, it fits on a floppy disk with lots of room to spare. Yes, I could realistically do nightly backups of my Web server on floppies. If floppies were at all reliable, that is.

I flip-flop on whether e-mail belongs on the same server. The security vulnerabilities of Web servers and mail servers are a bit different and it would be nice to isolate them. But I’m a lot more comfortable about a Linux box running both being exposed on the ‘Net than I am a Windows box running one or the other. If I had two boxes, and could afford to be paranoid, I’d use two.

Jeremy said his church had a P3-733 and a P2-450, both Dells, due for retirement. I’d make the P3 into a file/print/Web server and the P2 into a mail server and spend the money budgeted for a new server or servers to buy lots of disk space and a nice tape backup drive, since they’d get lots of use out of both of those. A new $1200 server would just buy lots of CPU power that’ll sit idle most of the time and you’d still have to buy disks.

As far as concern about the reliability of reusing older systems, the things that tend to wear out on older PCs are the hard drive and the operating system. Windows deterriorates over time. Server operating systems tend not to have this problem, and Linux is even more immune to it than Microsoft server operating systems. So that’s not really a concern.

Hard disks do wear out. I read a suggestion not long ago that IDE hard disks should be replaced every 3 years whether they seem to need it or not. That’s a little extreme, but I’ve found it’s hard to coax much more than four years out of an IDE disk. Dropping a new SCSI disk or two or three into an old workstation before turning it into a server should be considered mandatory. SCSI disks give better performance in multiuser situations, and are generally designed to run for five years. In most cases, the rest of the PC also has several years left in it.

Later this week, we’ll talk about Internet connectivity and workstations.

A reminder: 30 Days to a More Accessible Web Site

In a conversation today, I referred to Mark Pilgrim’s excellent 30 Days to a More Accessible Web Site.
This is must-read material. I confess to being guilty of neglecting most of the things in this piece, even though I would have gained substantial benefit from some of it at a recent point in my life, when I wasn’t able to operate a mouse and could barely keyboard.

I implemented the “add titles to links” feature. It required me to hack some PHP and is certainly the most substantial thing I’ve implemented without Steve’s help. It’s not much but it’s nice, even for those who have no disabilities–now, when you mouse over a calendar entry, the title of the entry pops up, like a tooltip. And for those using speech readers, now my calendar starts to make some sense.

As a bonus, some of this stuff will make Google treat you better if you implement it.

Read it. Download a copy and save it to your hard drive. And start implementing it.

Roll your own news aggregator in PHP

M.Kelley: I’m also wondering how hard would it be to pull a PHP/MySQL (or .Net like BH uses) tool to scrape the syndicated feeds off of websites and put together a dynamic, constantly updated website.
It’s almost trivial. So simple that I hesitate to even call it “programming.” And there’s no need for MySQL at all–it can be done with a tiny bit of PHP. Since it’s so simple, and potentially so useful, it’s a great first project in PHP.

It’s also terribly addictive–I quickly found myself assembling my favorite news sources and creating my own online newspaper. To a former newspaper editor (hey, they were student papers, but one of them was at Mizzou, and in my book, if you can be sued for libel and anyone will care, it counts), it’s great fun.

All you need is a little web space and a writable directory. If you administer your own Linux webserver, you’re golden. If you have a shell account on a Unix system somewhere, you’re golden.

First, grab ShowRDF.php by Ian Monroe, a simple GPL-licensed PHP script that does all the work of grabbing and decoding an RDF or RSS file. There are tons of tutorials online that tell you how to code your own solution to do this, but I like this one because you can pass options to it to limit the number of entries, and the length of time to cache the feed. Many RDF decoders fetch the file every time you call them, and some feeds impose a once-an-hour limit and yell at you (or just flat ban you) if you go over. Using existing code is a good way to get started; you can write your own decoder that works the way you want at some later date.

ShowRDF includes a PHP function called InsertRDF that uses the following syntax:
InsertRDF("feed URL", "name of file to cache to", TRUE, number of entries to show, number of seconds to cache feed);

Given that, here’s a simple PHP page that grabs my newsfeed:


<html><body>

<?php include("showrdf.php"); ?>

<?php

// Gimme 5 entries and update once an hour (3600 seconds)

InsertRDF("https://dfarq.homeip.net/b2rss.xml", "~/farquhar.cache", TRUE, 5, 3600);

?>

</body></html>

And that’s literally all there is to it. That’ll give you a very simple HTML page with a bulleted list of my five most recent entries. Unfortunately it gives you the entries in their entirety, but that’s b2’s fault, and my fault for not modifying it. I’ll be doing that soon.

You can see the script in action by copying and pasting it into your Web server. It’s not very impressive, but it also wasn’t any effort either.

You can pretty it up by making yourself a nice table, or you can grab a nice CSS layout from glish.com.

I can actually code tables without stealing even more code, so here’s an example of a fluid three-column layout using tables that’ll make a CSS advocate’s skin crawl. But this’ll get you started, even if that’s the only useful purpose it serves.


<html><body>

<?php include("showrdf.php"); ?>

<table width="99%" border="0" cellpadding="6">

<tr>

<td colspan="3" align="left">
<h1>My personal newspaper</h1>
</td>

</tr>

<tr>

<td width="25%">

<!--- This is the leftmost column's contents -->

<!--- Hey, how about a navigation bar? -->

<?php include("navigationbar.html"); ?>

</td>

<!--- Middle column -->

<td width="50%">

<p><h1>Dave Farquhar</h1></p>

<?php

// Gimme 5 entries and update once an hour (3600 seconds)

InsertRDF("https://dfarq.homeip.net/b2rss.xml", "~/farquhar.cache", TRUE, 5, 3600);

?>

</td>

<!--- Right sidebar column -->

<td width="25%">

<p><h2>Freshmeat</h2></p>

<?php

InsertRDF("http://www.freshmeat.net/backend/fm-releases-software.rdf", "~/fm.cache", TRUE, 10, 3600);

?>

<p><h2>Slashdot</h2></p>

<?php

InsertRDF("http://slashdot.org/developers.rdf", "~/slash.cache", TRUE, 10, 3600);

?>

</td>

</tr>

</table>

</body></html>

Pretty it up to suit your tastes by adding color elements to the <td> tags and using font tags. Better yet, use the knowledge you just gained to sprinkle PHP statements into a pleasing CSS layout you find somewhere.

Finding newsfeeds is easy. You can find everything you ever wanted and then some at Newsisfree.com.

Using something like this, you can create multiple pages, just like a newspaper, and put links to each of your files in a file called navigationbar.html. Every time you create a new page containing a set of feeds, link to it in navigationbar.html, and all of your other pages will reflect the change. This shows another nice, novel use of PHP’s niceties–managing things like navigation bars is one of the worst things about static HTML pages. PHP makes it very convenient.