Raspberry Pi Replace Home Server

Overview

With the popularity of Raspberry Pi I wanted to investigate if it was possible to replace my 24×7 Linux server running at home. Whilst one Raspberry Pi will not replace a desktop computer, it may be possible to use multiple Pis with dedicated functions. All Pi’s stated below are based on the Model B 512MB.

Applications / Services

The Linux computer services runs the following applications:

The above list is not definitive but regularly used and cannot proceed without them. Whilst some services can be replaced for equivalent such as MySQL for PostgresSQL.

Topology

First thing that needs to be done is to split the application list into groups which would allow the minimum number of Raspberry Pis to run all of the applications. This needs to be balanced between usage, resources required and priority.

Usage – It may be possible to group an application which is only used during certain situations or time of day with another. For example a uPnP server would be running 24×7 but only used when someone watches something.

Resource – Some are bigger more intense than other applications. For example Apache webservice is a heavy weight web server but it is also very powerful. It would be running 24×7. This also applies to database server if it’s used 24×7. This means ideally both should be running on separate lower powered computers.

Priority – Running a PBX system is more important than a uPnP server. Splitting the applications should take into account more mission critical services.

With the above in mind I have create a scenarios from ideal to worse case:
Scenario A
Raspberry Pi - Ideal
In the above almost each application run on their own dedicated hardware except for uPnP and Samba. If one of the Pis fail then it should not affect the other physically.

Scenario B
Raspberry Pi - Average
The average scenario still employs 4 Raspberry Pis but it means each application except the database share the hardware with another application. The above shows DB still get it’s own hardware as it stores the data. The others which share application were mainly based on load. For example uPnP and Samba are storage / streaming services so external drives can be shared or located in one place.

Scenario C
Raspberry Pi - Worst Case
The above is the worst case using two Pis. The LAMP based stack reside on one Pi whilst all others run off another.

All the above are un-tested so some scenarios may not work.

Parts

Below are parts needed in addition to:

No additional hardware is required for the Apache web server Pi unless there are large sites running off it. All files should fit on a large 32GB SD card.

MySQL Pi will probably require additional memory to store the database data. This can be USB stick to an external hard drive.

uPnP/Samba Pi should have a large external drive for storing media for uPnP and scratch disk for sharing files.

Power Consumption

The Raspberry Pi runs off at 3.5W. This is peak draw so during low utilisation it should not draw that much but for ease of calculation and worst case scenario it is assumed it draws the max rated watts.

Western Digital external desktop drive has a power adapter rated at 18W. Whilst it probably won’t reach that much it is the maximum the adapter will supply.

A Pi with an External drive would total 21.5W. Over a period of 24 hours is 516Wh or 0.5kWh.

The current computer with the following specs:

average around 145w using a 500w PSU. In 24 hours the computer would use 3480wh or 3.48kWh. That’s a 574.419% increase! Using 12.566p/kW from British Gas single price tariff the Raspberry Pi costs £64.84 where as the PC costs £437.30 to run for 24 hours. The amount of power consumed by one PC equates to over 6.5 Raspberry Pi’s.

From the above Scenario A would cost £327.54 less per day to run. The uPnP and Samba server would have 2 attached and the rest would share the storage.

Cost

Current cost of the following parts at the time of writing:

Above all include delivery costs.

The total cost for one Raspberry Pi would total £64.66 so:

The ideal scenario is not cheap considering an OEM box form someone like Dell costs £329.01 for:

and for an extra £12 you get the above plus NVIDIA® GeForce GT 620 1GB and 1TB HDD. The performance of the single desktop computer would probably out perform the 6 Raspberry Pi which makes Scenario A not very cost effective.

The cheapest desktop Dell came in at £279 for a Intel® Pentium® G2020 Processor (2.90GHz, 3MB) with the same RAM and HDD as listed above which again would probably do better than 4 Pi’s for an extra £20.36 making Scenario B out of the question.

Scenario C would benefit from the cost as the only real competitor were the likes of Sheeva plugs. For the price of 2 Pi’s and all the accessories required comes to about the same price as one Sheeva plug. In this case I’d rather have 2 Pi’s than 1 Sheeva.

Of course the above highlights it does not scale to costs and the initial outlay for hardware would be cheaper to buy a Desktop PC than multiple Pi’s.

Summary

Whilst the initial cost of the Raspberry Pi is relatively high, the running cost of the Pi is extremely good. Assuming my calculations are correct the savings of 6 Raspberry Pi’s with 2 external HDD exceeds the cost spent on the hardware in less than a week.

Raspberry Pi Wikipedia

18W Power Adapter for My Book At Western Digital Store

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Hardware and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.