Home > Java, Raspberry Pi > Pick a Java VM for Raspberry Pi

Pick a Java VM for Raspberry Pi

There are several possible Java engines for the Raspberry Pi, but it is not trivial to pick the right one. Oracle’s Java versions are the fastest by far, but they are not free. Oracle Java SE 7 Embedded for Linux/ARM requires a license and it supports only the old soft-float version of Raspbian, not the newer hard-float version. Oracle Java SE 8 Embedded supports hard-float and is the fastest option, but it is still in preview and may not be used in production at all.

OpenJDK is free, supports hard-float and is easy to install, but it is much slower (see chart).

Raspberry Pi Java VM performance

The test case is fairly simple (generate random numbers and compute their MD5 sum), but the results match other tests. Personally I would go for OpenJDK with Avian or one of Oracle’s Java versions, depending on the situation. Hopefully Java SE 8 will be released soon and without the need for a cumbersome license…

EDIT: With a more realistic and long-running test case Avian ran into problems. This illustrates the problem with micro-benchmarks. Be sure to test with real-world code before making a choice! Oracle’s JVM is still the fastest. The test measures the number of business transactions completed per minute.

Transactions per minute

Categories: Java, Raspberry Pi
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: