Hate UML?

Draw sequence diagrams in seconds.
http://www.websequencediagrams.com

Using the Acer Aspire One as a web server
Posted on: 2009-07-18 12:08:19

My web site has been going up and down over the night more often than a [offensive metaphor removed]. 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.

Specs

  • 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 (?!)

Initial experiences

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'

Want more programming tech talk?
Add to Circles on Google Plus
Subscribe to posts

Post comment

Real Name:
Your Email (Not displayed):

Text only. No HTML. If you write "http:" your message will be ignored.
Choose an edit password if you want to be able to edit or delete your comment later.
Editing Password (Optional):

Matthias

2009-07-18 12:51:42
Setting keepalive = 0 is not such a good idea.

It means each image needs a new HTTP connection, which wastes bandwidth.

I was able to have around 80 concurrent apache processes on a 128 meg VPS. The key is to do it without any server side processing.

Caddy

2009-07-18 14:10:25
so spend £10 on a 1gb ram stick?

ro89

2009-07-18 14:42:13
use lighttpd + php + apc or just add apc php cache. That will speed up your php scripts. Also try to add mysql caching and app level caching to disk.

Jamse

2009-07-18 15:37:12
It's probably not the cost of a memory module but rather the installation of said memory stick that is the problem:

"It badly needs a RAM upgrade, but this requires you to completely disassemble it.. " that

Leonardo Vaz

2009-07-18 21:44:05
Don't forget upgrading the BIOS after adding more RAM memory. Did it some weeks ago and the SSD just died. After a week trying use SD cards I was about to throw it to the garbage can and I had the idea of upgrade the BIOS to the latest version and it worked. ;)

Regards from South of Brazil,

Leo

James

2009-07-18 22:18:59
It can handle twenty visits per minute? Are you talking about smoothed load? Does that mean your website has an average latency of three seconds? That's way too long dude.

Steve Hanov

2009-10-07 13:51:34
Three seconds isn't too long at all. There is plenty of text on my pages to read while the images are loading for two more seconds.

batteries99

2009-11-03 21:23:34
input volts: AC 100V-240V

output volts: 15-21 Volt( DC )

power: 30W

Acer Aspire One Laptop AC Adapter for Sale,25% off!

www.espow.ca/laptop-ac-adapter/acer-aspire-one.htm

George Jetson

2010-04-01 11:02:45
Very good idea using a netbook for a server. Save a lot on energy bills not to mention sound levels.

rick

2010-04-17 16:30:50
Hi Steve,

I've got an aspire one that I also use as a home server. The memory upgrade is fairly easy and takes less than 10 minutes. I've upped the RAM on mine to 2GB.

I also swapped out the crummy atheros card with a broadcom one I got off ebay. Highly recommend this change if you're serious about using it wirelessly!

Nikos

2010-05-29 19:45:57
cool idea. running web server on a laptop but what about the heating?

it will soon die?!

Steve Hanov

2010-05-30 21:43:56
Nikos: It's been working continuously for 11 months now. However, summer in my house kills equipment so we will see what happens!

I have a way of switching things to a backup within a few hours if the Acer fails.

Simon

2010-08-17 05:38:38
I use an Aspire One as a netbook pretty reasonably thanks to Ubuntu Lynx Netbook Edition and Chrome / optimised Firefox. I hadn't thought of using it as a webserver though, neat idea. Consider the SheevaPlug range though - designed for the job and an excellent product.

John Trashtalker

2012-02-06 13:43:11
Apache is an absolute joke. Allocating a full thread stack for every request was the dumbest design decision ever made. Although I expect nothing less from the morons who also gave us Apache Ant.

Boasting about how many 8MB stacks your tiny server can sustain is like boasting about how thick the lead walls are on your airliner's fuselage. Completely missing the point and utterly retarded.

mister person

2012-04-03 01:00:09
you will probably get less latency if you upgrade the WiFi card (located under the touch pad when you disassemble) or use a cat5e cable instead of wireless. many things from lights, Bluetooth, microwave ovens, and people trying to connect to your network slow your network speed down.

Donald

2012-07-01 18:42:50
I just found this post; I've been thinking about doing something similar.

I don't see a search function here, is the Netbook still working as a server?

David Hill

2013-01-14 16:44:45
Thanks for this article! Glad to see I'm not the only one who sees the value in using my old Netbook as a server... I just did a similar write up on the merits of Netbooks for serving web requests... haven't gotten into tuning Apache yet though. Mine has 2 Gig of memory so I haven't seen any performance issues yet to speak of, even with using a portion of it for memcached.

davidvhill.com/article/why-you-should-use-a-netbook-for-your-webserver if you are interested.

Email
steve.hanov@gmail.com

Other posts by Steve

Yes, You Absolutely Might Possibly Need an EIN to Sell Software to the US How Asana Breaks the Rules About Per-Seat Pricing 5 Ways PowToon Made Me Want to Buy Their Software How I run my business selling software to Americans 0, 1, Many, a Zillion Give your Commodore 64 new life with an SD card reader 20 lines of code that will beat A/B testing every time [comic] Appreciation of xkcd comics vs. technical ability VP trees: A data structure for finding stuff fast Why you should go to the Business of Software Conference Next Year Four ways of handling asynchronous operations in node.js Type-checked CoffeeScript with jzbuild Zero load time file formats Finding the top K items in a list efficiently An instant rhyming dictionary for any web site Succinct Data Structures: Cramming 80,000 words into a Javascript file. Throw away the keys: Easy, Minimal Perfect Hashing Why don't web browsers do this? Fun with Colour Difference Compressing dictionaries with a DAWG Fast and Easy Levenshtein distance using a Trie The Curious Complexity of Being Turned On Cross-domain communication the HTML5 way Five essential steps to prepare for your next programming interview Minimal usable Ubuntu with one command Finding awesome developers in programming interviews Compress your JSON with automatic type extraction JZBUILD - An Easy Javascript Build System Pssst! Want to stream your videos to your iPod? "This is stupid. Your program doesn't work," my wife told me The simple and obvious way to walk through a graph Asking users for steps to reproduce bugs, and other dumb ideas Creating portable binaries on Linux Bending over: How to sell your software to large companies Regular Expression Matching can be Ugly and Slow C++: A language for next generation web apps qb.js: An implementation of QBASIC in Javascript Zwibbler: A simple drawing program using Javascript and Canvas You don't need a project/solution to use the VC++ debugger Boring Date (comic) barcamp (comic) How IE <canvas> tag emulation works I didn't know you could mix and match (comic) Sign here (comic) It's a dirty job... (comic) The PenIsland Problem: Text-to-speech for domain names Pitching to VCs #2 (comic) Building a better rhyming dictionary Does Android team with eccentric geeks? (comic) Comment spam defeated at last Pitching to VCs (comic) How QBASIC almost got me killed Blame the extensions (comic) How to run a linux based home web server Microsoft's generosity knows no end for a year (comic) Using the Acer Aspire One as a web server When programmers design web sites (comic) Finding great ideas for your startup Game Theory, Salary Negotiation, and Programmers Coding tips they don't teach you in school When a reporter mangles your elevator pitch Test Driven Development without Tears Drawing Graphs with Physics Free up disk space in Ubuntu Keeping Abreast of Pornographic Research in Computer Science Exploiting perceptual colour difference for edge detection Experiment: Deleting a post from the Internet Is 2009 the year of Linux malware? Email Etiquette How a programmer reads your resume (comic) How wide should you make your web page? Usability Nightmare: Xfce Settings Manager cairo blur image surface Automatically remove wordiness from your writing Why Perforce is more scalable than Git Optimizing Ubuntu to run from a USB key or SD card UMA Questions Answered Make Windows XP look like Ubuntu, with Spinning Cube Effect See sound without drugs Standby Preventer Stock Picking using Python Spoke.com scam Stackoverflow.com Copy a cairo surface to the windows clipboard Simulating freehand drawing with Cairo Free, Raw Stock Data Installing Ubuntu on the Via Artigo Why are all my lines fuzzy in cairo? A simple command line calculator Tool for Creating UML Sequence Diagrams Exploring sound with Wavelets UMA and free long distance UMA's dirty secrets Installing the Latest Debian on an Ancient Laptop Dissecting Adsense HTML/ Javascript/ CSS Pretty Printer Web Comic Aggregator Experiments in making money online How much cash do celebrities make? Draw waveforms and hear them Cell Phones on Airplanes Detecting C++ memory leaks What does your phone number spell? A Rhyming Engine Rules for Effective C++ Cell Phone Secrets