Crowley Code! 
 (Take 12)

Cost analysis of running a server at your house 2007/08/10

I have always been a big fan of running my own server to have complete control over pretty much everything.  I like having the power to break everything, sometimes just so I can put it back together.  But is this economically sensible?

Last month, PG&E charged me $0.1143 per kilowatt-hour for electricity.  My machine has a 400 watt power supply, but by best estimates it draws about 50 watts just sitting around serving web traffic.  Running all day, every day, this will cost me about $4.11 for the 36 kilowatt-hours burned.  Junk change.  Services from (mt), TextDrive and Amazon run $50, $45 and $72 per month respectively.

I could say case-closed right here and now but let's make this interesting.  I made a notable omission in my comparison above -- bandwidth.  I have the distinct displeasure of being a Comcast customer and theoretically have 768Kbps upload speed.  Checking with Speakeasy, I actually have 1526Kbps upload to San Francisco and 1518Kbps upload to New York City.  Sweet!  Whether you believe this as little as I do is unimportant -- it's a far cry from the 100Mb+ connection available to every self-respecting datacenter.

Right now the homepage of this site is 22KB (and is by far the most visited page on the site).  Nevermind the poor visitor-engagement, this means that at my current upload bandwidth I can serve 8.625 requests per second.  This is downright poor compared to the 568 requests per second theoretically possible on a 100Mb connection.  At the moment though, all that extra capacity will just go to waste.

Of course, what would be the fun in hosting a website in an environment with stable power?  PG&E sometimes cuts the power just to keep me on my toes or keep me from waking up for work, but how much does this really cost me?  I don't make any money from any of my sites (not even AdSense), but if I did, here's what I'd consider.  For every hour a site is down, you lose some amount of money.  If that amount times the number of hours of downtime per month is greater than the cost of reliable hosting, maybe the reliable hosting is worthwhile.  However, even reliable hosting goes down sometimes, so you can't count all of your downtime at home against the price difference.

Whew.  So now with a little qualification, I can still sleep comfortably with my server fans running and my would-be hosting money in my pocket. I need a lot more traffic and a lot more income before I spring for root-access on a box in a datacenter.

It should be mentioned that I serve this site from a TextDrive shared acount because I destroy my server so often that a simple Wordpress install does well to stay away.

Comments (35)

  1. You're assuming costs of maintenance, storage, upgrades are sunk -- which they are until the next time you have to upgrade or do a major update, such as replace a hard drive.  The full costs -- total cost of ownership -- I'm guessing is much higher.  And if you are looking to monetize (AdSense, e.g.), then your current server may be better utilized doing something else.  That opportunity cost is something to consider as well.

    Not that I think about these things or anything ;)

    — Jason — 2007/08/10 10:48 am

  2. Nice article Richard. I used to have a rack of servers in my basement when I lived with my parents..  those were the days. Plenty of space and free electricity - I picked up some old SGI, IBM, and Compaq hardware on EBay and had servers running everything from Irix to AIX to FreeBSD. At any given time half of them would be broken, but it didn't matter!

    These days I have a dev box at home, but run all my "production" sites (the ones that actually serve real traffic) from a dedicated (physical, not virtual) server. Deciding on a colocation vs. self-hosting vs. dedicated wasn't easy, but I think for my purposes the dedicated route was the most cost effective. The one thing you're missing in your cost analysis is the price of the server itself. To self-host you have a high upfront cost for hardware ($1000 to $1500, at least, for a decent server). With dedicated hosting you pay monthly for the server _and_ the hosting. In some situations, the money you save by not purchasing a server up-front can more than offset the additional monthly costs of a dedicated hosting solution.

    The ideal solution for a smallish site, in my opinion, is to find some friends to share a dedicated box with. You can get a 100mb/s box with 2GB RAM and a sufficiently fast processor for around $100/mo (or less) from EV1Servers/ThePlanet. If you have three or four people sharing the box, that's around $25 to $33/mo each. The hard part is finding two or three people you trust who are in a similar situation.

    Mike Malone — 2007/08/10 11:43 am

  3. You're both right that the cost of the machine is a big deal.  Jason's right that the costs are sunk until something breaks.  I could argue the hardware costs are sunk permanently because I'd probably keep a Linux box around anyway.  Or we could start splitting hairs to determine how much of the hardware cost is due to server traffic.  Any way you slice it, you're both right that hardware costs should play into the calculation anyway.

    Richard Crowley — 2007/08/10 12:27 pm

  4. As others have said, you pay for the hosting and the server each month with a dedicated solution. You don't have to worry about maintenance, broken SAS hard drives which get expensive and all of that. An EC2 instance will run you a bit more than $72/month - that's only considering "$0.10 per instance-hour consumed", not data storage, transfer, etc. So maybe $75/month. ;-)

    As for your main machine, you're right about it not consuming the full 400W. I have no idea what your box is like but 400W * average PSU efficiency of 70% is about 280 max Watts, but at nearly idle load you would use about 10W/stick of RAM, 10-15W/hard drive, ~30W for an idling CPU, 5-10W for fans or something like that. My roommate has a watt meter he plugins into his setup and his massive gaming computer only sucks about 250W at load.

    Paul Stamatiou — 2007/08/10 12:59 pm

  5. Just to throw out what I'm using right now, , is cheaper than those other solutions at $20/month and I'm fairly happy with it thus far.  At least happy enough that I'll probably keep paying even after I stop using Google's free wireless as my internet and actually have real internet again.

    David — 2007/08/10 4:32 pm

Richard Crowley?  Kentuckian engineer who cooks and eats in between bicycling and beering.

I blog mostly about programming and databases.  Browse by month or tag.

To blame for...

© 2009 Richard Crowley.  Managed by Bashpress.