Pi2ModB1GB_-comp-500x283.jpeg

This is the Raspberry Pi 2, which I used to calculate pi against other Pis. (Image via Raspberry Pi)


I received a Raspberry Pi 2, and immediately wanted to see how much of an improvement it was. Games seem smoother, especially first person shooters. Arcade emulation is buttery as well, however perceived speed wasn’t scientific enough for me so I decided it would be apt to calculate Pi, on the Pi.

 

To start with, I installed the Command Line Calculator, called BC

 

Easy to install… type at the command prompt:  sudo apt-get install bc

 

To calculate pi, I used the command line formula:  time echo "scale=2015; 4*a(1)" | bc -l

 

Scale is the number of decimal places to calculate. The a() portion is the Arc Tangent function. Obviously, the bc part is the bc utility.

 

The results for the three Pi models (original B, B+, and Pi 2), at stock clock frequency, were as follows (results in seconds):

 

Model B

Real  0m24.996s

User 0m24.660s

Sys 0m0.260s

 

Model B+

Real  0m24.940s

User 0m24.620s

Sys 0m0.250s

 

Pi 2

Real  0m15.575s

User 0m15.470s

Sys 0m0.090s

 

The model B and B+ results were the same, which isn’t surprising since the boards are almost identical. Unsurprisingly, added RAM has no influence on this simple calculation. Also, I ran the calculation several times and found the results varied, which was surprising.

 

The Pi2 had a 62% improvement in time over its predecessors. As it turns out, that the bc calculation was a single thread operation, and only one core is used, however the Pi2 beat it predecessors by 9.085 seconds with 3 cores tied behind its back.

 

I could extrapolate that if the load was shared across the cores, the Pi2 could calculate Pi in 3.8938 seconds. Which is about 155% improvement over the original Pi models. However, that is just a hypothesis.

 

To discover more about taxing all the cores in a benchmark, I discovered the following benchmark results.

 

Looking at the MP-MFLOPS

 

Using Roy Longbottom’s Android multithreading benchmark MP-MFLOPS, it’s clear that the Pi2 is noticeably faster, especially when it’s overclocked to the maximum @ 1,000MHz. Of course, this is with using all 4 cores of the ARM Cortex-A7 running 8 threads (2 Hyperthreads per-core) running 2 operations per-word and 32 respectively. The benchmark for the old RPi (single-core running @ 700MHz) achieved 43 MFLOPS @ 12.8 loops running 2 Ops/Word and 191 MFLOPS @ 12.8 loops running 32 Ops/Word respectively.

 

You will no doubt notice the difference in speed with the Pi2 and the use of all 4 of its cores utilizing 8 threads (higher numbers are better). The Pi2 clocked @ 900MHz came in with 494 MFLOPS @ 12.8 loops running 2 Ops/Word and 1581 @ 12.8 loops running 32 Ops/Word respectively. Crank the processor up to 1000MHz ups those numbers to 543 and 1588 @12.8 loops, making it considerably faster over the original Pi.

 

On 2 Ops/Word, the Pi2 (all 4 cores) is 1148% faster than the original. At 32 Ops/Word, the Pi2 (all cores) was approximately 83% faster and the original Pi B.

 

pi bench.JPGpi2 bench.JPG

Benchmarking the MFLOPS (via Roylongbottom)

 

MP-MFLOPS isn’t the only benchmarking tool that can be had for the Pi2 platform as Raspberry Pi blog user Dan Robinson benched the new board against the B+ using the SunSpider JavaScript tool to clock his speed. The app suite from Webkit runs JavaScript to measure real-world performance such as encryption and text manipulation, making it ideal for measuring the performance for web browsers as well as the Pi2. After benchmarking his board using SunSpider, Dan’s results were interesting to say the least with 4452.1ms for the Pi2 and a shocking 23692.7ms for the B+ (lower numbers are better). To put that into perspective, another blog user Martin O’Hanlon makes it easy to understand those differences sating ‘Minecraft server on a Pi1 = adequate, Minecraft server on a Pi2 = awesome’.

 

octane.png

Google’s Octane 2.0 is just one of the few tools that users can use to benchmark the Pi2.

 


Another benchmark I found was was about video transcoding, done by Andrew Oakley on Raspberrypi.org. His results:

Transcoding Skinny Puppy’s “Pro-Test”, 360×270 Quicktime .MOV, 256kbps MP3, to same resolution MP4 at CRF 26, 96kbps, using avconv:

Raspberry Pi 1 (1x 700MHz ARMv6, 512MB RAM, Raspbian Wheezy): Average 1 frame per second. 18 mins to complete.

Raspberry Pi 2 (4x 900MHz ARMv7, 1GB RAM, Raspbian Wheezy): 28 FPS, 4 min 9 secs to complete –

Intel Celeron dual-core (2x 2.5GHz 686, 2GB RAM, Ubuntu Precise): 114 FPS, 1 min 3 secs

 

You can see the Pi 2 is getting results close to desktop processors. There are plenty of other benchmark tools on the internet that can be used to measure the performance of the Pi2, including Nbench, Google Octane and Unixbench as well as a host of others. After looking at some of those it becomes quite clear that the Raspberry Pi 2 is more of a desktop PC than a mere development board, which is certainly the case when it comes to the performance of the original Pi and even the B+.

 

C

See more news at:

http://twitter.com/Cabe_Atwell