9 April 2011

Server upgrade time

I have a small Linux box which serves as a home server for the house. It performs a variety of duties:

  • Each night rdiff-backup takes a snapshot of all our web sites.
  • There’s a file sharing area available via netatalk and SSH.
  • There’s a home wiki for organizing recipes, Christmas gifts and other household stuff. Currently I use JSPWiki, which runs on tomcat6. I’m not wild about its aesthetics, and would prefer a Rails solution, but haven’t found one I like.
  • MediaTomb shares music and movie files via DLNA UPnP, mainly for the PlayStation 3.
  • Firefly, aka mt-daapd, provides the Macs of the house with music, since Apple won’t support open standard protocols but at least allow DAAP playback to continue to work.
  • The mpd daemon provides me with music while I work.
  • An IMAP server (dovecot, using Maildir+ storage) allows convenient archiving of e-mail.
  • The box also provides local NTP and a DNS cache.

I built my first home server back in 2003. It used a VIA EPIA M10000 mini-ITX motherboard, featuring a VIA C3 x86 CPU (designed here in Austin!) running at 1GHz. That wasn’t a fast CPU even then; I wanted something small and energy-efficient, rather than a gaming rig, and the M10000 ran at 24W under heavy load.

Unfortunately, over the years bloat has affected free software, just as it has affected proprietary code. A year or so ago I started getting glitching when playing MP3s via MPD; top would show CPU usage for the process spiking. I did some tracing, and worked out that most of the CPU was being chewed up in the ALSA drivers for the VT1616. For a while I got acceptable sound by ripping out ALSA and installing OSS 4, but even that wasn’t a complete solution.

In the mean time, getting the PS3 meant I became interested in real-time transcoding, and obviously the C3 wasn’t going to be up to that, and bittorrent would make it struggle. So I decided last year that it was probably time to build a better server. I started browsing for suitable components, but kept putting it off for some time when we had more disposable income.

Then last week, my little server started spontaneously rebooting at random. Nothing in the syslogs to indicate why. I pulled and reseated the RAM, checked it with memtest, found nothing wrong. I checked the SMART status of the disks. It was looking like either a PSU problem, or a problem with the actual motherboard. So my plans for a new server suddenly got brought forward.

There are quite a lot of small computers around these days. Some of them are very energy efficient. The Mac Mini, for example, idles at under 10W. It also seems as though Apple will be bundling the server version of OS X with the release of OS X Lion, so that seemed like an obvious option. However, even though I’m a Mac user, Apple’s recent behavior (locking down the iPad, purging all GPL software from OS X, opening a Mac App Store with the same restrictive policies as the iOS App Store) has been leaving me somewhere between “worried for the future of the Mac” and “angry at Apple”. So I decided a Mac Mini was my last resort, and that the price of a Mac Mini was my absolute maximum budget.

I looked at a lot of small, low-power and quiet computers out there. Most of them have at least one of the following issues:

  • High price. If you think the Mac Mini is expensive at $700, you don’t even want to know how much you can spend on a truly fanless computer like the ones from Hush Technologies.
  • Small fans. Most computers need some sort of cooling fan. A small fan needs to spin faster to move the same volume of air, which means more noise, and noise at a higher and more noticeable pitch.
  • Laptop hard disks. The assumption seems to be that if you want a quiet low-power computer, you want it really tiny; so everyone seems to use 2.5″ hard disks. Unfortunately, they’re just not as reliable as full size hard drives. Seagate rate their current Barracuda 3.5″ drives as having an Annualized Failure Rate (AFR) of 0.34%; their 2.5″ Momentus drives have an AFR of 0.48%. So Seagate themselves rate laptop drives as being about 40% more likely to fail in any given year. My personal experience is that I’ve had 3 laptop drives die on me in normal in-home use, compared to 0 full-size drives.
  • Slim optical drives. Again, the assumption seems to be that just because I want a machine that’s quiet and efficient, I must want it to be tiny. Manufacturers don’t seem to provide failure rates for optical drives, but again, I’ve had two slim drives fail, versus zero full-height drives. In addition, it’s much easier to find a full-height drive that will let you reflash the firmware to remove the DRM so you can rip or play any CD or DVD you buy. (Many people don’t know that any DVD drive built after the year 2000 enforces region coding in the drive firmware.)
  • Lack of convenient disk expansion options. I was willing to consider something like an ASUS Eee Box, but very few of them offer eSATA or Firewire ports. USB is a horrible way to expand hard drive space; even ignoring performance issues, USB sucks CPU, and most of these small PCs are using low-end CPUs to start with. USB 3.0 uses less CPU than USB 2.0, but that still leaves it more of a drain than eSATA or Firewire, and none of the quiet efficient systems seem to use it yet.

I looked at a lot of pre-built boxes. Then I chanced on silentpcreview’s review of the Lenovo E20 workstation, which praised its near-silent 20dB noise level. It hadn’t occurred to me that Lenovo might make quiet micro-ATX towers. What’s more, it was eco-friendly and idled at a reasonable 40W or so.

Before long I’d found my new machine: a Lenovo ThinkCentre A70, model 7099. Mine’s the entry-level model, a Celeron E3300.

Normally the thing to do when you see the word “Celeron” is to walk in the opposite direction, but when I checked out reviews it turned out that the E3300 is an exception to the rule. It beats an Athlon X2, and compares well to Core 2 Duo CPUs of similar clock speed. It’s also pretty energy-efficient, idling at 20W. Apparently Intel are counting on the negative brand equity of the “Celeron” name to keep people away.

The eco-declaration said that Lenovo measured the A70 as having about the same sound output level as the E20. It was a lot cheaper than the E20, though–NewEgg had the A70 for just $335. With a price like that, there was very little to gain from building something myself.

The final deciding factor was that the A70 series is actually Linux certified. All the hardware works with Linux. So I ordered one. It arrived yesterday; I wiped the unwanted copy of Windows without even letting it finish booting, and installed Debian.

Build quality of the machine is excellent. The metal case is matte black, the front panel is mostly matte black plastic, and the sturdy handle makes it easy to move the whole box around. No screwdriver is needed to open it up; just unscrew two furled knobs and the side panel drops open.

It’s mostly legacy-free, with four USB connectors on the rear and two on the front, and no PS/2 keyboard or mouse connectors. Curiously, though, there’s a serial port, maybe those are still useful in some businesses?

There’s stereo audio in and out, and initial listening suggests the onboard sound quality is at least adequate. The onboard video also worked fine; KDE 4 ran snappily enough while I got things set up, then I adjusted the runlevels to get rid of it. Obviously it’s not a gaming machine, but it’d work fine for ordinary office tasks–and that’s clearly what Lenovo were going for.

As far as noise goes, the case has no fan behind the rear vent, so the 10cm power supply fan is the main source of noise. Overall the machine is quieter than either my work laptop or the central air conditioning in my office.

I went with 64 bit Linux, even though I only have the stock 1GB of RAM in the machine. Benchmarks say it should be about 8x as fast as my C3 at anything CPU-bound, and it certainly feels that way.

So overall, highly recommended for anyone who needs a cheap, quiet, reasonably energy-efficient Linux box with plenty of expansion and upgrade capability.

© mathew 2017