«

Feb 10

Raspberry Pi performance

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.

Hardware.

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

Software.

As OS I use Raspbian. This is a Debian derivative that has been optimized for the Raspberry Pi.

Measurements.

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:

  1. The Raspberry Pi model B version 2.0, running at 700MHz
  2. My current FreedomBox. This is an 1.2 GHz Marvell Kirkwood 6281 system. The same SoC is used for the DreamPlug.
  3. The MK802, which uses an 1 GHz Allwinner A10.
  4. An Intel Atom 330 system running at 1.6 GHz
  5. 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.

Results.

Raspberry Pi
ARM 11
Marvell
6281
MK802
WIFI
MK802
Wired
Atom
330(*)
Desktop
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.

2 comments

  1. trawas

    Really interesting!
    I would like to know how a raspberry pi “mini supercomputer” (-link deleted by admin-, not with 64 nodes but for example 4) would performance with an application server – for example tomcat and a known tested application with JMeter. Are you thinking about testing something like this? The 3.4 seconds per page is not something really encouraging to test a “home server with raspberry pi” but who knows…

    1. robvanderhoeven

      I only want to test hardware that everyone can buy, not special configurations.

      The 3.4 seconds is the time it takes to create my homepage from scratch. If you visit my website you will notice that the page is served much faster (~ 100ms). This is because the result of the first page creation is cached by wp-cache, and further page responses are served from the cache.

      Keep in mind that WordPress is *very* slow. As an experienced programmer I knew that my hardware was capable to handle more request for my homepage. To test this I wrote the program I used for the benchmarks in this article. Result: WordPress 1/3 page per second, my program 17 pages per second.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>