Performance Rendered Visual

Duke rendering

I’ve written a couple of blogs in the past about jHiccup, which is a really useful tool for looking at the performance of the platform your Java application is running on. jHiccup can show you things like the real impact of garbage collection pauses on your application. Recently, however, I found another use for it, which is to compare the performance of different algorithms used in the JVM.

One of the JDK Enhancement Proposals (JEPs) included in JDK 9 is JEP 265, Marlin Graphics Renderer. The OpenJDK source code currently uses a rendering engine called Pisces but, as the JEP points out, the performance of this is “much poorer” than the closed-source renderer (Ductus) used in Oracle’s binary distribution of the JDK (often referred to somewhat misleadingly as Hotspot). The variation of implementation highlights one instance of where the OpenJDK source code is slightly different to Oracle’s binary distribution. Since there is no external API for the renderer there is no compatibility issue here. 

Marlin is a re-write of the code that is intended to provide an open-source renderer with performance more comparable to the closed-source version. The tricky part is figuring out what impact the different rendering engines have on performance, which is where jHiccup come in.

At Azul, we also create a binary distribution of the OpenJDK, called Zulu. Our build is compiled purely from the OpenJDK open-source code; there are no closed source replacements, so something like this is of great interest to us. Ensuring we deliver JVMs with the best possible performance is what we spend all our time focusing on.

To compare the relative performance we used jHiccup so that we could isolate the effects of the different rendering engines and make a valid comparison. Example results of using the various rendering engines are in the graph below.

Rendering performance comparison graph


What we can see here is that overall the Pisces engine is slower than either Ductus or Marlin. Both Marlin and Ductus seem to follow a similar pattern of latency with Marlin even out-performing Ductus some of the time.

If you’re writing graphics based applications using Java the good news in that JDK 9 will no longer require a closed-source implementation of the renderer to get the best level of performance. The even better news is that we have integrated the Marlin engine into our Zulu build of OpenJDK 8, which will be available soon. Happy rendering!

© Azul Systems, Inc. 2017 All rights reserved.