Java On Raspberry Pi Performance
From Resin 4.0 Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | My objective is to performance test | + | My objective is to performance test basic JVM functions of different JVMs on the Raspberry Pi hardware to see which JVM is fastest overall. For this I have created a few different tests that exercise specific operations, such as floating-point math, file IO, etc. The results are not relevant compared to other hardware. The results metrics are really not important either other than as they compare to the same test on a different JVM. |
= VMs Tested = | = VMs Tested = | ||
− | There's currently a few different JVMs available for Raspberry Pi. I tested these | + | There's currently a few different JVMs available for Raspberry Pi. I tested these: |
* Oracle ejre1.7.0_06 | * Oracle ejre1.7.0_06 | ||
Line 30: | Line 30: | ||
= Startup Time = | = Startup Time = | ||
+ | |||
+ | <table border="0" width="100%" cellpadding="0" cellspacing="0"> | ||
+ | <tr> | ||
+ | <td valign="top" width="650" align="left">[[Image:Pi-startup640.png]]</td> | ||
+ | <td valign="top" align="left"> | ||
+ | === Tests === | ||
* '''HelloWorld''' is a basic print Hello World from a main method. This tests basic startup time. | * '''HelloWorld''' is a basic print Hello World from a main method. This tests basic startup time. | ||
* '''ResinVersion''' requests Resin version. It tests basic Resin startup time. | * '''ResinVersion''' requests Resin version. It tests basic Resin startup time. | ||
* '''ResinStatus''' requests status from a running Resin instance. The call fails as no instance was running, but that's not important. It tests realistic Resin startup and network connection. | * '''ResinStatus''' requests status from a running Resin instance. The call fails as no instance was running, but that's not important. It tests realistic Resin startup and network connection. | ||
+ | |||
+ | === Results === | ||
JamVM is clearly the fastest to startup but the margin is not huge. I believe this is due to the smaller size of this JVM. However the caveat is both Cacao and JamVM report warning when running both Resin tests. | JamVM is clearly the fastest to startup but the margin is not huge. I believe this is due to the smaller size of this JVM. However the caveat is both Cacao and JamVM report warning when running both Resin tests. | ||
Line 52: | Line 60: | ||
These all look like warning associated with attempting to read MBean attributes from MBeans Resin is expecting to exist. Resin gleans a lot of info about OS and Memory Pools from JMX. I'll have to do more thorough Resin tests to see how adversely this effects Resin. | These all look like warning associated with attempting to read MBean attributes from MBeans Resin is expecting to exist. Resin gleans a lot of info about OS and Memory Pools from JMX. I'll have to do more thorough Resin tests to see how adversely this effects Resin. | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
− | + | = General Operations = | |
− | + | ||
− | = | + | |
+ | <table border="0" width="100%" cellpadding="0" cellspacing="0"> | ||
+ | <tr> | ||
+ | <td valign="top" width="650" align="left">[[Image:Pi-operations640.png]]</td> | ||
+ | <td valign="top" align="left"> | ||
* '''Exceptions''' tests throwing and catching exception | * '''Exceptions''' tests throwing and catching exception | ||
* '''Hashing''' tests inserting into a map and retrieving from a map | * '''Hashing''' tests inserting into a map and retrieving from a map | ||
* '''Reflection''' tests looking up a class by name and creating a new instance with Reflection | * '''Reflection''' tests looking up a class by name and creating a new instance with Reflection | ||
− | * '''Strings'' tests | + | * '''Strings''' tests String creation and concatenation |
− | + | ||
− | + | ||
− | + | ||
− | + | </td> | |
+ | </tr> | ||
+ | </table> | ||
== Math == | == Math == | ||
− | [[Image:Pi- | + | [[Image:Pi-math640.png]] |
== IO == | == IO == | ||
− | [[Image:Pi- | + | [[Image:Pi-io640.png]] |
Revision as of 00:00, 6 December 2012
My objective is to performance test basic JVM functions of different JVMs on the Raspberry Pi hardware to see which JVM is fastest overall. For this I have created a few different tests that exercise specific operations, such as floating-point math, file IO, etc. The results are not relevant compared to other hardware. The results metrics are really not important either other than as they compare to the same test on a different JVM.
Contents |
VMs Tested
There's currently a few different JVMs available for Raspberry Pi. I tested these:
- Oracle ejre1.7.0_06
java version "1.7.0_06" Java(TM) SE Embedded Runtime Environment (build 1.7.0_06-b24, headless) Java HotSpot(TM) Embedded Client VM (build 23.2-b09, mixed mode)
- java-7-openjdk-armel with -zero
java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.3) (7u3-2.1.3-1) OpenJDK Zero VM (build 22.0-b10, mixed mode)
- java-7-openjdk-armel with -cacao
java version "1.7.0_03" IcedTea Runtime Environment (IcedTea7 2.1.3) (7u3-2.1.3-1) CACAO (build 1.1.0pre2, compiled mode)
- java-7-openjdk-armel with -jamvm
java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.3) (7u3-2.1.3-1) JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching)