GraalVM Enterprise starts each new year with the general availability of the first of four quarterly releases. This first release typically introduces enhancements to existing features and often provides the first look at new features that will be finalized by the end of the year. This year is no different. GraalVM Enterprise 22.0 debuts new compiler optimizations and several Native Image improvements for better peak performance, lower memory requirements, smaller executables, and more informative and user-friendly generation output. Here are some of the highlights.
GraalVM Enterprise 22.0 removes the previously experimental status of improvements to the Serial GC policy. This means that executables generated by the 22.0 release of the native-image utility now get the benefits of the improvements without any additional configuration. On microbenchmarks, the new GC policy changes can improve peak performance and have been seen to reduce RSS (memory required by a process) by up to 30%. The Serial GC policy is the default policy and is ideal for an application with a small heap. For an application with a large heap, the G1 garbage is also available on Linux platforms.
Native executables generated by GraalVM Enterprise 22.0 are faster and leaner than earlier releases; they are also smaller thanks to improvements in metadata compression and String optimizations that are able to exclude unused localization classes.
Probably the biggest visible change in GraalVM Enterprise 22 is the improved output from the
native-image utility output. It has been completely overhauled to provide developers with more insight into the generation of a native executable as well as more details about its final composition. The default output of various elements provides lots of useful infomation, as follows.
It is now easier to track progress in the generation process: each stage is numbered and, upon completion, the time and memory each stage used is displayed.
Static Analysis Details
Static analysis results are provided including reachable classes, fields, and methods along with statistics on classes registered for reflection and JNI access.
The composition of the generated executables is now easy to see along with a breakdown of the code area size and heap snapshot size.
Top Package and Objects
It is useful to know what packages contribute most to the executable size as well as how many instances you have of the most commonly- used classes in the snapshot heap. This is particularly helpful for debugging unexpectedly large executables.
You can now see the maximum memory used by the native-image utility along with garbage collection and CPU metrics.
Upon completion you can see the artifacts generated by the native-image utility and the total execution time.
Release to release, GraalVM Enterprise delivers better performance, reductions in memory and CPU usage, and improved usability along with many more improvements in polyglot language support and tooling. For a more in depth look at what’s new in the 22.0 release browse the release notes.
Shaun Smith leads product management of Oracle Lab's GraalVM.