GraalVM in 2023: a year in review

Alina Yurenko
graalvm
Published in
8 min readDec 21, 2023

--

The year is coming to an end and lots of exciting things happened around GraalVM! In this blog post, we want to share with you the most interesting and important updates from the GraalVM project and community in 2023.

New Distribution and New Release Cadence

The biggest news for us this year is Oracle GraalVM. In June we released Oracle GraalVM under the new GFTC license, which includes all of the most advanced GraalVM features (such as profile-guided optimizations, ML-enabled profile inference, G1 GC, and additional compiler optimizations) in development and in production, for free.

Since then Oracle GraalVM has become available on many platforms. You can get container images from Oracle Container Registry, install via SDKMAN!, use in GitHub actions, and use Oracle GraalVM as a Paketo buildpack for Spring and other projects.

As we announced a while ago, we also changed our release cadence. If you’ve been with us since the early days before general availability, you might remember that we were releasing release candidates very frequently, pretty much every month, as we were actively experimenting and developing GraalVM.

Since GA in May 2019, we moved to a three-monthly release cadence with yearly LTS releases: this has enabled us to release new features and get frequent feedback, as well as provide stable releases for users who prefer stability.

If you are curious about the evolution of GraalVM and how we turned it from a research project into a product, Thomas Wuerthinger talks about exactly that in this awesome Strange Loop presentation.

Graal project timeline by Shaun Smith

Now as the project has matured further, and also because we are aligning more closely with OpenJDK, we have moved to a six-monthly release cadence. What’s even better, we release on the same date as OpenJDK. Speaking of releases, let’s talk about our latest release: GraalVM for JDK 21!

GraalVM for JDK 21

On September 19th we released GraalVM for JDK 21. From now on, our releases will be fully aligned with the OpenJDK releases. This means that you can use all the latest Java features and GraalVM features at the same time!

The community certainly shares our excitement:

You can learn more about GraalVM for JDK 21 in our release blog post or live stream recording. Along with several performance and developer experience updates, all the Java features that went GA in this release (such as virtual threads from Project Loom) are also fully supported in GraalVM, including Native Image. Even better performance!🚀

If you are curious about what we are currently working on, join our open-source development on GitHub. As you can tell, we have had a very productive year!

GraalVM open source on GitHub in 2023

And all of this hard work really paid off — GraalVM CE packages were downloaded 3 million times!😲

AOT at the Speed of JIT

There’s no limit to performance. We are constantly working on improving performance and see more and more applications being faster with AOT — for the latest example, see Spring Petclinic in GraalVM for JDK 21:

While there can be different optimization strategies, as a rule of thumb we recommend always trying out the combination of Oracle GraalVM + profile-guided optimizations + G1GC.

Expect even more performance updates with April’s GraalVM for JDK22!

Machine Learning in Native Image

To make the best decisions about compiler optimizations in the AOT world, where the run time hasn’t yet happened, you need profiling information. The most precise profiles are user-provided — the ones you would generate during a PGO run. However, there can be cases when users don’t do PGO, so profiles might be missing. Sounds like predicting application profiles could be a perfect task for a machine learning model, and it is. In GraalVM for JDK 20 we introduced machine-learning-based profile inference that enables ~6% better performance compared to the default Native Image configuration. We are also working on a new generation of ML-based profile inference, which will improve out-of-the-box Native Image performance even further and specifically target microservices workloads — stay tuned!

Truffle Unchained

With GraalVM for JDK 21, we “unchained” Truffle — you can now use it with any GraalVM version, and even with other JDKs (yet you will get the best performance with the Graal compiler). Adding Truffle or Truffle languages, such as Python or JavaScript, to your project, is now as easy as adding two Maven/Gradle dependencies.

Learn more or run our demo to try it out.

Ecosystem

We see almost 200 libraries and frameworks that are regularly testing and working with Native Image out of the box. The way that we recommend for library maintainers to provide and ensure compatibility with Native Image is to create and ship configurations within their library. The next best solution is the GraalVM Reachability Metadata Repository. We introduced it last year as a centralized place where users can contribute, share, and reuse configuration for Native Image for various Java libraries. Since then the repo received more than 300 contributions, and several frameworks, such as Spring Boot and Micronaut, have moved to this repo for unified configuration rather than using custom implementations.

We also see almost 1800 projects building on top of setup-graalvm in their GitHub Actions workflows!🚀

Community

One of our favorite community events every year is the GraalVM Community Meetup. It’s a two-day event in Zurich where we meet with our partners and community members, talk about recent and upcoming updates, and have working sessions on various topics.

GraalVM Community Meetup

The next event will most likely be in November 2024, follow the page or our social media for announcements.

In other community highlights, we also had a nice community BOF session at Devoxx Belgium, and a panel discussion about the current state and the future of Native Image together with our partners:

Another big update is that we now have GraalVM ACEs. The Oracle ACE Program recognizes and promotes technical experts and community leaders for their contributions. We are very happy that we now have our own ACE category with Thomas Vitale, Matt Raible, Sergio Del Amo, and Ionut Balosin who joined as GraalVM ACEs, and Gail Anderson and Paul Anderson, who were existing ACEs with GraalVM expertise. Congrats and welcome!

GraalVM ACEs

User stories

One of our favorite user stories this year is NetSuite moving a large-scale Java application (100,000+ loaded classes, running on tens of thousands of servers worldwide) to GraalVM JDK for performance benefits. With GraalVM, they achieved on average 1.07x-1.08x speedup depending on the workload, with up to 1.15x on some of them.

We also saw a nice story of a Ballerina application going from 980 ms to 52 ms startup time and from 242 MB to 93 MB RSS with GraalVM.

Another quite similar story was from 10MinuteMail, who moved to GraalVM and Spring Boot 3 to, as they say, continue to meet the demands of their growing user base. The results that they achieved are pretty cool: the startup time of the application was reduced from ~30 seconds down to about 3 ms, and more importantly, the memory usage was also significantly reduced from 6.6 GB down to 1 GB, with the same throughput and CPU utilization. Read more about their story.

There were many amazing community contributions this year — pull requests, demos, conference videos, and blog posts, but since this blog post is already getting out of hand (and also since we love all things performance), I want to highlight two related performance studies by Ionut Balosin:

The TL;DR there is that the Oracle GraalVM JIT compiler outperformed other JIT compilers in the study, and GraalVM Native Image showcased the highest energy efficiency during runtime execution.

GraalVM Community Survey

Every year we ask for your opinions about how to make GraalVM better. Many of the suggestions you’ve made are already implemented — faster build times for Native Image, more compatible libraries, and better performance. We are always looking for feedback on what is working well and what can be improved — share it with us (takes <5 minutes).

Coming up next!

Layered Native Images

At the GraalVM Community Meetup we first presented one of our most forward-looking projects for Native Image — Layered Native Images. This will be a brand new way to build native executables with GraalVM. Unlike the current native images — standalone native executables, which contain all the necessary code of your application and its dependencies — layered native images will be built in a layered fashion, similar to container deployments. This way, your application will be built on top of one or several base images, such as your framework core, framework web server, etc. This way we can accomplish two major goals:

  • After introducing changes, only the application code needs to be recompiled, dramatically reducing build times;
  • Base images can be shared between application instances, reducing overall resource usage.

GraalOS

An OS based on GraalVM, how cool is that! Earlier this year at Oracle Cloud World we announced GraalOS. It’s a new way to deploy Java applications, based on Native Image, where a deployment unit is an executable, rather than a container. This way we are taking advantage of the latest hardware features directly, and are eliminating the overhead of deploying and bringing up a container while ensuring top-notch isolation and scalability.

We are working on GraalOS as we speak, stay tuned for more news!

Conclusion

We are actively working on the next release of GraalVM due in March and are always happy to get your feedback via Slack, GitHub, or Twitter.

Thank you for being a part of our community and for all your contributions, suggestions, and support. We wish you happy holidays and a peaceful break and see you in 2024!🎄

— the GraalVM team

--

--

Alina Yurenko
graalvm

I love all things tech & community. Developer Advocate for @graalvm, blog posts about programming, open source, and devrel.