Oracle is pleased to announce the availability of Oracle GraalVM for JDK 21. This release brings with it new Java 21 features, improvements in Native Image performance, simplified usage of embedded languages, and more.
Project Loom Virtual Threads
First previewed in JDK 19, Project Loom is no longer a preview feature in JDK 21. GraalVM for JDK 21 implements Loom’s virtual threads when running on the JVM and when using Native Image.
Native Image Performance
While executables generated by GraalVM Native Image may be best known for their quick startup time, metrics such as memory usage, peak throughput, and latency are also critically important. With Oracle GraalVM for JDK 21 we see ahead-of-time (AOT) compilation achieving superior results on all metrics when benchmarking the popular Spring PetClinic application. While some developers might expect that JIT compilation would always outperform AOT compilation, the throughput achieved by Native Image generated executables in GraalVM for JDK 21 provide competitive peak performance.
All the following Spring PetClinic benchmark results were obtained with a maximum heap size of 512MB. The two configurations compared below are: a native executable produced by Oracle GraalVM for JDK 21 optimized with profile guided optimization (PGO); the same application running on GraalVM Community Edition for JDK 21 using the C2 JIT compiler. Both configurations use the G1 garbage collector.
Startup (seconds): Native 97% faster
GraalVM (C2 JIT) | Oracle GraalVM Native Image (PGO+G1) |
7.09 | 0.21 |
GraalVM (C2 JIT) | Oracle GraalVM Native Image (PGO+G1) |
1029 | 641 |
GraalVM (C2 JIT) |
Oracle GraalVM Native Image (PGO+G1) |
7.20 | 5.15 |
GraalVM (C2 JIT) |
Oracle GraalVM Native Image (PGO+G1) |
11066 | 11902 |
0 comments:
Post a Comment