Using the Acer Aspire One as a web server
My web site has been going up and down over the night. I've intentionally been trying to elicit reddit traffic so I can test different parameters for apache server optimization, to handle high traffic over slow connections.
A netbook can be ideal for a home web server. They are cheap, and use less power than a CFL light bulb. The only trade-off is that it won't reboot on a power failure. Fortunately, the built in UPS will sustain it through all but the longest power outages.
My Via Artigo died several weeks ago while I was using it. I have no air conditioner, so it must have been about 30 degrees which may have contributed to its demise. I took it apart and poked at it, but the monitor and disk light wouldn't light up. So ended up getting a $179 refurbished Acer Aspire One, which is now happily serving up this web site.
- 1.6 GHz Atom processor (with hyperthreading)
- 512 MB memory
- 8 GB SSD
- Wifi, ethernet, VGA ports
- 3 USB ports and 2 SD card slots (?!)
I turned it on briefly and it had a linux based OS on it that boots up in a less than 5 seconds and looks confusingly like Windows XP. Enough about that.
Because I only install Ubuntu on USB keys, I was able to plug it in, boot up, and my web site was up and running in only minutes.
The fan is the quietest I have ever heard on any laptop. It makes almost no sound at all.
Lousy performance as a desktop system
My old Artigo had a Via 1 GHz CPU and 1 GB of memory, and it could be used as a desktop system. Not so with the Acer. Even with the increased processor power, the decrease in RAM eats up all the benefit. After installing Xubuntu, the system is too sluggish to handle common desktop tasks. It badly needs a RAM upgrade, but this requires you to completely disassemble it..
The tiny speakers are junk. Imagine listening to a movie through ear-buds one metre away. That's how bad it is. But it doesn't matter, because it's a server.
Handling Server Load
With Ubuntu 9.04, after a day of serving up moderate web activity, the Linux Atheros Wifi driver was stuck in a bad state so it was offline. I switched it to a plug-in cable and haven't had any more issues.
The system went non-responsive an hour after I posted my last comic strip. It had a blank screen and needed rebooting. However, I hadn't optimized apache2 yet. Using the approriate settings, I believe that it can handle about between 30 and 40 visits/minute, or anything reddit and ycombinator can throw at it. I'm still tweaking with the apache parameters, and I'll post something about them soon.
Things to watch out for when running a home web server
- Ensure that MaxClients is set to a reasonable value (memory divided by 7 MB?) in your apache2.conf file. If you come home to find your machine non-responsive and thrashing, this is the cause. To be ultra-safe, you can flip the "KeepAlive" setting to Off, but your pages will load more slowly.
- If serving over a dynamic IP address, make sure your machine is configured to automatically update it. I installed ddclient to do this, but on Ubuntu it wasn't automatically restarting after a reboot.
- As always, be careful with large images. Save photos as low quality JPGs, and screenshots as 16-colour .PNG files. Don't put up anything over 50 kb.
- The limiting factor is bandwidth, not CPU. Enable gzip compression using 'a2enmod deflate'