Comparing JVMs with SPECjvm2008 on ARM64
As a follow-up article to my first Java benchmarks on ARM and inspired by an article link I received on Twitter, I wanted to run the SPECjvm2008 benchmark suite into my ARM64 SBC using different JVMs.
According to the website:
The SPECjvm2008 workload mimics a variety of common general purpose application computations. These characteristics reflect the intent that this benchmark will be applicable to measuring basic Java performance on a wide variety of both client and server systems.
I used the same ARM64 SBC from before, a Firefly RK3399 with hexa-core CPU (big-little), 4GB RAM and DietPi Linux (Debian) with Kernel 4.4.138.
I ran the benchmarks using the parameters:
java -jar SPECjvm2008.jar -wt 30s -it 1m -bt 6 -i 3 -ikv -ict [benchmark]
That’s 30 seconds warm-time, 1 minute iterations, 3 iterations and 6 threads. More details on the SPEC user guide. For Java 11 I had to add -ict
flag due to a compiler test incompatibility with latest JDK versions.
Results
I tested OpenJDK 8 and 11 using Docker containers:
docker run -it --rm -v $(pwd):/test openjdk:8u181-jdk-stretch bashopenjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)docker run -it --rm -v $(pwd):/test openjdk:11.0.1-jdk-stretch bash
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Debian-2bpo91)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Debian-2bpo91, mixed mode)
Conclusion
Again Java 8 is ahead of Java 11 on synthetic benchmarks. Java 8 was in average 7.65% faster than Java 11 on aggregate results.
The biggest hit was in crypto benchmark where Java 8 is 17% faster in average. I believe that with JEP315 this picture will improve since new optimizations will be added to ARM64 platform.
For now, I’ll keep using OpenJDK 1.8.0_181 for my projects.