The Raspberry Pi seems nice hardware for a small home server like the FreedomBox. It is both low power and low cost. The only questions for me were: is it powerful enough - how does it compare to other computers?
On the Raspberry Pi website I read that it's performance is roughly equal to a 300 MHz Pentium 2 which is not very helpful. I once owned a 300 MHz Pentium 2 system, but that was 15 years ago. I really have no idea how any modern system compares to it.
In my previous article I measured the performance of the MK802 stick computer. This computer turned out to perform roughly equal to a single core Intel Atom. Last week I finally got my own Raspberry Pi so I decided to run the same tests for the Pi.
I bought version 2.0 of the Raspberry Pi model B. This version has the following hardware:
SoC: Broadcom BMC2835 CPU: 700 MHz ARM 11 GPU: Broadcom VideoCore IV Memory: 512 Mb (shared with GPU) USB: 2 * USB 2 Video: Composite out, HDMI 1.4 Audio out: 3.5 mm jack + HDMI Network: 10/100 Mbit RJ45 Storage: 32 GB Samsung class 10 SD card
As OS I use Raspbian. This is a Debian derivative that has been optimized for the Raspberry Pi.
To measure the performance I used an experimental python-powered version of my blog. This version does not use a database, but stores the individual postings in a simple directory structure. For each request 10 postings are read from disk and served as one HTML page that looks (almost) exactly like my normal blog. The size of this page is 64.9 Kb.
On a fast system Apache bench was used to measure the performance in pages/sec. I requested 1000 pages with a concurrency of 10.
The measurements were done for the following systems:
- The Raspberry Pi model B version 2.0, running at 700MHz
- My current FreedomBox. This is an 1.2 GHz Marvell Kirkwood 6281 system. The same SoC is used for the DreamPlug.
- The MK802, which uses an 1 GHz Allwinner A10.
- An Intel Atom 330 system running at 1.6 GHz.
- My Desktop system with a dual core G620 Pentium processor running at 2.6 GHz.
Except for the MK802, all systems have a wired 1Gb Ethernet connection. For the MK802 i did two measurements: one with WiFi Ethernet and one with a wired 100Mb USB-Ethernet adaptor.
Raspberry Pi Marvell MK802 MK802 Atom Desktop ARM 11 6281 WiFi Wired 330(*) G620 (**) Pages/sec. 17 25 12 39 174 805 MB/sec. 1.1 1.64 0.77 2.5 11.2 52 Power (W) 3 (#) ~13 3-4 (#) 4 (#) 35 45 Pages/sec/W 5 2 3 10 5 18 (#) A fair comparisson would include 5W for the missing HD (~) estimation, could not measure without ruining my uptime :-) (*) 4 threads were used. (**) 2 cores (= 2 threads) were used.
As you can see, the Raspberry Pi is not very fast. Still I found its performance much better than expected. It roughly performs at 70% of my current FreedomBox and roughly at 40% of a single core Intel Atom clocked at 1.6 GHz. This may not look great but remember that the important question is not how fast it is, but: is it fast enough?
Having expected much worse results for the Raspberry Pi I wondered if the test reflected real-world performance. What if I run some real-world server software like Apache on it? To test this I installed Apache with Wordpress on the Raspberry Pi and copied my blog to the Raspberry Pi.
Requesting the main page of my blog took 3.4 seconds on the Raspberry and 2.6 seconds on my Marvell system. A difference of 25 percent. Not bad! I find the performance of my FreedomBox quite acceptable and I do not think anyone would notice it it was 30 percent slower. So in my opinion the Raspberry Pi would be fine hardware for a FreedomBox.