Raspberry Pi 4 speed boost in 64bit moe

Java versions

PC

$ java --version
openjdk 14 2020-03-17
OpenJDK Runtime Environment AdoptOpenJDK (build 14+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14+36, mixed mode, sharing)

Raspberry Pi

32bit

$ java --version
openjdk 13-BellSoft 2019-09-17
OpenJDK Runtime Environment (build 13-BellSoft+33)
OpenJDK Server VM (build 13-BellSoft+33, mixed mode)

$ uname -a
Linux raspberrypi4 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux

64-bit Raspbian kernel

I upgraded my existing Raspbian installation to the 64-bit kernel, following the steps described in “Raspbian added support for 64-bit kernel” by Amin Mahpour. The OS itself is still 32-bit but this should give a faster working kernel.

$ uname -a
Linux raspberrypi4 4.19.113-v8+ #1300 SMP PREEMPT Thu Mar 26 17:04:40 GMT 2020 aarch64 GNU/Linux

I tried installing the 64-bit version of the BellSoft LibericaJDK but this doesn’t work as it needs full 64-bit userspace. So I ran my tests with the same “openjdk 13-BellSoft” 32-bit version.

As you will see in the tables below, this doesn’t have a positive impact on the Java performance at all.

64bit Manjaro ARM 20.04

https://forum.manjaro.org/t/manjaro-arm-20-04-released/133374

Used version “Manjaro-ARM-xfce-rpi4-20.04.img.xz” from this download page.

sudo apt update
sudo apt upgrade
sudo apt install ubuntu-desktop
sudo reboot

Results

To run on Raspberry Pi

$ mvn clean package
$ java -jar target/movingdots-0.0.1-jar-with-dependencies.jar
N° dots PC Pi 32 Pi 64 / 32bit java
10 110 50 50
20 110 50 50
50 110 45 47
70 110 45 53
100 110 45 47
150 110 37 37
200 110 28 28
500 110 15 15
$ java PerformanceTest.java
Run PC Pi 32 Pi 64 / 32bit java
1 14 65 50
2 16 67 53
3 14 65 49
4 12 69 49
5 15 68 49
6 19 74 56
7 16 65 52
8 17 69 50
9 27 71 50
10 23 75 49