
JetBrains and Azul have announced a “strategic technical collaboration” to improve the performance of Kotlin applications running on the JVM (Java Virtual Machine), showing significant performance gains when running on Azul’s Zing JDK (Java Development Kit), pricing for which starts at $100 per vCore per year.
JetBrains is a tools company, while Azul is a Java specialist with its own JDK builds. In a post this week JetBrains showed test results for three benchmarks, one from the TechEmpower framework used by many vendors to measure performance, based on standard operations such as database access using object-relational mapping (ORM), dynamic collections, sorting, and more; and two from an application designed to perform CPU-intensive and memory-intensive operations.
According to the post, using Azul’s performance-tuned Zing JDK improved latency by between 23.9 and 27 percent, and throughput by between 30.5 and 38.1 percent, versus a standard OpenJDK. These are significant gains, which might translate into using fewer hardware instances or less powerful hardware for the same performance.
Azul’s Zing uses several techniques to improve performance. One is the Azul-developed Falcon JIT (just-in-time) compiler, based on the open source LLVM compiler. Falcon translates Java bytecode into LLVM IR (intermediate representation) before compilation into machine code. Another is what Azul calls pauseless garbage collection, also known as C4 (Continuously Concurrent Compacting Collector). The concurrent aspect means that the garbage collector, which frees memory and relocates objects, operates without pausing the flow of execution.
The Kotlin team adds that future work will explore the Kotlin compiler, which outputs Java bytecode, to further optimize the output if possible.
From the developer perspective, compiler and runtime improvements come for free, in that no change to the code is required to get better performance. In this case though there is a financial cost. Azul packages the Zing JDK as part of a product called Platform Prime, and according to the FAQ the cost of this starts at “$100 per vCore per year” though it could be lower for volume purchases. The performance tests were run on an AWS VM with 8 vCPUs and 16GB RAM, so using Zing in this case would add $800 per year to the cost, undermining any gain from reduced infrastructure requirements.
We also note that the performance of different JVMs differs and that technologies like the HotSpot runtime JIT compiler in the OpenJDK are configurable, making it hard to draw conclusions about performance from this test which set only the minimum and maximum memory heap, according to the post. Some JDK 21 performance comparisons can be found here, unfortunately not including Zing, nor Amazon Corretto, though code is available for those interested in running their own tests.