Single Board Computer Benchmarks

Over the last few years, I have evaluated many single board ARM computers for mobile robotics and home automation applications. Here are some rough benchmark results comparing across different SBC generations that may help avoid some bad buys:

Raspberry Pi

CPU : ARMv6-compatible processor rev 7 (v6l)
L2 Cache :
OS : Linux 4.0.9+
C compiler : gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
libc : libc-2.13.so
MEMORY INDEX : 2.528
INTEGER INDEX : 3.150
FLOATING-POINT INDEX: 2.073

Banana Pi


CPU : Dual
L2 Cache :
OS : Linux 3.4.90
C compiler : gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
libc : libc-2.13.so
MEMORY INDEX : 3.448
INTEGER INDEX : 4.516
FLOATING-POINT INDEX: 3.794

Raspberry Pi 2


CPU : 4 CPU ARMv7 Processor rev 5 (v7l)
L2 Cache :
OS : Linux 3.18.5-v7+
C compiler : gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
libc : libc-2.13.so
MEMORY INDEX : 4.256
INTEGER INDEX : 5.640
FLOATING-POINT INDEX: 4.786

Raspberry Pi 3


MEMORY INDEX : 7.105
INTEGER INDEX : 8.976
FLOATING-POINT INDEX: 7.601

Radxa Rock with antiquated kernel on NAND:


CPU : 4 CPU
L2 Cache :
OS : Linux 3.0.36+
C compiler : gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)
libc : libc-2.19.so
MEMORY INDEX : 9.142
INTEGER INDEX : 9.994
FLOATING-POINT INDEX: 9.965

Radxa Rock Pro with experimental 3.18 kernel on SD card:


CPU : 4 CPU ARMv7 Processor rev 0 (v7l)
L2 Cache :
OS : Linux 3.18.0-rc5+
C compiler : gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)
libc : libc-2.19.so
MEMORY INDEX : 3.463
INTEGER INDEX : 3.741
FLOATING-POINT INDEX: 3.665

Hardkernel Odroid XU4 on SD card


CPU : 8 CPU ARMv7 Processor rev 3 (v7l)
L2 Cache :
OS : Linux 3.10.82
C compiler : gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04)
libc : libc-2.19.so
MEMORY INDEX : 15.504
INTEGER INDEX : 15.309
FLOATING-POINT INDEX: 14.164

And my current 13″ MacBookPro 🙂


CPU : 2,8 GHz Intel Core i7
L2 Cache :
OS : Darwin 14.5.0
C compiler : Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
libc :
MEMORY INDEX : 47.880
INTEGER INDEX : 40.440
FLOATING-POINT INDEX: 83.190

You can benchmark your own SBCs with nbench by:

If you have some interesting results of your own, please don’t forget to drop a comment.

Fhem Temperaturmessung mit 1wire & RaspberryPi

Ich verwende einen Maxim DS18S20 Temperatursensor mit folgender Belegung:

DS18S20 Belegung

Dieser wird folgendermaßen mit dem Raspberry Pi verbunden:

DS18S20 VDD an +3,3V vom Pi (Pin 1)
DS18S20 DQ an GPIO04 (Pin 7)
DS18S20 GND an GND vom Pi (Pin 6)

RaspberryPi P1 Header

Ausserdem ist noch ein Pullup-Widerstand von 4,7 kOhm zwischen Pin 1 und Pin 7 zu schalten.

Sobald der Sensor richtig verkabelt ist können wir uns der Software zuwenden und probeweise folgende Kernelmodule laden:

Wenn das ohne Fehler klappt können diese Module auch in die /etc/modules eingetragen werden, damit sie nach jedem Neustart automatisch geladen werden:

Update: Ab Kernel 3.18.3 bitte stattdessen dtoverlay=w1-gpio-pullup in die config.txt einfügen

Nun kann der 1Wire sensor unter Fhem eingebunden werden. Dazu zuerst das GPIO Modul aus dem contrib Ordner in den FHEM Ordner kopieren:

und in Fhem mit

einladen und den Raspberry Pi als Busmaster definieren:

Die Sensoren sollten dann beim nächsten Neustart automatisch erkannt werden.

How to keep your Raspberry Pi up to date

A question I find myself googling again and again is how to keep my Raspberry Pi up to date. Here is a short recipe:

Setup Motion on Raspberry Pi with Email Motion Alert

As postfix config use „Direct SMTP“ option, if necessary enable TLS:

You can test if everything works correctly with:

Now its time to get a version of motion tailored for the raspicam:

Add the freshly created motion user and yourself to the video group just for good measure:

Otherwise the motion service may fail silently with * failed to open vchiq instance

Enable and start the motion daemon with

Create a directory for motion’s videos and log files:

Make some adjustments to motion.conf, especially the paths for logs and videos:

and change
;on_picture_save
to
on_picture_save echo ‚Motion alert‘ | mail -a %f -s „Motion alert“

and reload the config file:

Create a directory for motion’s videos and log files:

Check if the motion process is running by

motion 7676 82.4 2.6 91488 23656 ? Sl 13:00 1:33 /usr/bin/motion

If there is no running motion process, check the service status for additional details why motion exited:

The output should look like:

tatsch@raspberrypi3
● motion.service - LSB: Start Motion detection
Loaded: loaded (/etc/init.d/motion)
Active: active (running) since Sat 2016-06-11 13:00:30 CEST; 1s ago
Process: 7662 ExecStop=/etc/init.d/motion stop (code=exited, status=0/SUCCESS)
Process: 7669 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/motion.service
└─7676 /usr/bin/motion

Jun 11 13:00:30 raspberrypi3 motion[7669]: Starting motion detection daemon: motion.
Jun 11 13:00:30 raspberrypi3 systemd[1]: Started LSB: Start Motion detection.
Jun 11 13:00:30 raspberrypi3 motion[7676]: [0] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion.conf
Jun 11 13:00:30 raspberrypi3 motion[7676]: [0] [NTC] [ALL] motion_startup: Motion mmaltest Started
Jun 11 13:00:30 raspberrypi3 motion[7676]: [0] [NTC] [ALL] motion_startup: Logging to file (/home/tatsch/motion/motion.log)

If motion is setup correctly, you should be able to see the web stream:

http://raspberrypi3:8081

If you are unable to open the stream, check if motion is listening on the port:

Mask for motion

If you get a lot of false positives from the motion detection with your webcam or raspicam you should consider masking out the susceptible parts (busy streets, moving leaves etc.).

Simply take a false positive frame from your motion setup e.g. with VLC -> Video -> Snapshot. The mask must have exactly the same size as the image:

frame

Select the area where the motion should be masked out, fill it with black, invert the selection and fill the rest white. Save as jpeg and convert to pgm with imagemagick

or a jpeg-to-pgm converter.

mask

Now you can transfer the mask via scp or directly download the pgm file with:

and add the mask in your motion config file by:

and adjusting the mask_file path as follows:

# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
mask_file /home/motion/mask.pgm

Finally restart the motion daemon:

and you should get a lot less false positive motion detections.