3

I run a basic benchmark on my machines:

time echo "scale=3000;4*a(1)" | bc -l

This computes Pi to 3000 decimal places. The general expected time in my experience is 35-60 seconds on a Raspberry Pi B+, 2, 3.

One of my machines is giving 24 seconds, which is far out of the ordinary. This machine is a Raspberry Pi 3. My other Pi 3s give a consistent 48 seconds. I have checked the governor (it is ondemand), boot config parameters and rebooted to make sure its clean.

I am not asking for alternative benchmark systems. I do know what I have is shakey (does not test multiple CPUs etc...), but the differences are surprising and consistent.

What could be causing such anomolous behavior?

UPDATE: I have started looking at the problem again. I used a fresh install of the OS and added extra programs one by one. It seems the slowdown happens when using the packages openmpi-bin and python-mpi4py. I am investigating further.

4
  • 2
    Does it still happen if you swap SD cards?
    – joan
    Commented May 31, 2016 at 13:18
  • @joan : will test as soon as I have physical access.
    – John Smith
    Commented May 31, 2016 at 14:20
  • My RPi 2 B ran this in 38.5 seconds. I think the bigger problem is that your testing methodology is unsound.
    – Jacobm001
    Commented May 31, 2016 at 15:01
  • install htop and run it during your test. It will show all processes and the load on each core.
    – tlhIngan
    Commented Jul 8, 2016 at 21:54

2 Answers 2

4

Running that command to bench your RPi is not so acurate. That command will burn 1/4 cores of your Pi, thats why you get weirds results. Try to activate all 4 cores at 100%.

I coded a small benchmark script for raspberry (multi-core benchmark), to test it just copy and paste this command on your RPi:

curl https://raw.githubusercontent.com/aikoncwd/rpi-benchmark/master/rpi-benchmark.sh | sudo bash

It will test your CPU, Memory and microSD-IO. Here is my result for my overclocked RPi3:

Raspberry Pi Benchmark Test
Author: AikonCWD

temp=39.2'C
arm_freq=1400
core_freq=550
sdram_freq=575
microsd_clock=91.667 MHz

Running CPU test...
    total time:                          15.0670s
    temp=54.8'C

Running MEMORY test...
    total time:                          2.1438s
    temp=55.8'C

Running THREADS test...
    total time:                          7.6511s
    temp=58.0'C

Running HDPARM test...
    Timing buffered disk reads: 114 MB in  3.04 seconds =  37.47 MB/sec
    temp=49.4'C

Running DD WRITE test...
    536870912 bytes (537 MB) copied, 15.2853 s, 35.1 MB/s
    temp=46.2'C

Running DD READ test...
    536870912 bytes (537 MB) copied, 14.2355 s, 37.7 MB/s
    temp=45.1'C


AikonCWD's rpi-benchmark completed!

Try to run this benchmark over all your RPies and compare/share results here.

Feel free to fork my script and edit the values for a more "hardcore" benchmark :)

1
  • I do understand the limits of my approach. I just find the results surprising, so I thought there was something I overlooked.
    – John Smith
    Commented May 31, 2016 at 14:45
2

For what it's worth, I just ran that same test on a stock Raspberry Pi 3B running Raspbian Jessie and it completed in 24.3 seconds. It took 73.4 s on a Model B rev 2 running Wheezy.

Unless you have an idea of the system load beforehand, this isn't a particularly good general benchmark. Arbitrary-precision decimal number handling is a slightly special case. Maybe take a look at Roy Longbottom's Raspberry Pi & Raspberry Pi 2 Benchmarks for some options.

3
  • Sorry, had some escape characters for what I was doing. Fixed now.
    – John Smith
    Commented May 31, 2016 at 14:19
  • That is closed to what I have with my other machines, except for the one weird one.
    – John Smith
    Commented May 31, 2016 at 15:24
  • 1
    My Pi 3b ran this in 24 seconds as well. I think the question, @JohnSmith, is why does your other 3 not do it in 24s?
    – Jeff Meden
    Commented May 31, 2016 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.