Monday, October 25, 2021

GraalVM Enterprise 21.2—Productivity and Performance

GraalVM Enterprise 21.2, GraalVM Enterprise 21.2—Productivity and Performance, Oracle Java Preparation, Oracle Java Exam Prep, Oracle Java Career, Oracle Java Cert, Java Guides, Java Jobs, Java Learning

The latest GraalVM Enterprise 21.2 release delivers both new performance features, and improved developer experience—including enhancements to GraalVM Native Image to make it easier than ever to compile applications into native executables.

Let’s take a look at some of the highlights of the GraalVM Enterprise 21.2 release, available as part of an Oracle Java SE Subscription.

Relentless Focus on Performance

With new compiler optimizations in 21.2, GraalVM Enterprise continues to improve application performance for many workloads. As it is based on Oracle JDK these benefits can be enjoyed without requiring code changes.

GraalVM 21.2 also includes new developer tool features and capabilities, and enhancements to the GraalVM Native Image feature that make it easier than ever to compile applications into native executables. At the heart of GraalVM is the advanced optimizing Graal compiler which provides just-in-time (JIT) compilation for applications running on the Oracle JDK HotSpot JVM, and ahead-of-time (AOT) compilation in the Native Image utility which generates native executables. In both cases, the Graal compiler is responsible for turning high-level Java bytecodes into native machine instructions that can be run by a CPU, whether it be an Intel/AMD x86 or ARM Aarch64 processor.

Processor architectures and instruction sets continue to rapidly evolve bringing new capabilities that can, if used, accelerate application performance. “If used” is the key here. Java developers rely on the bytecode compiler to exploit the latest hardware features for them. If the compiler does not include optimizations for these new features, an application won’t benefit from them. For example, Intel’s AVX512 and ARM’s NEON architectures have expanded SIMD (Single Instruction Multiple Data) capabilities designed to accelerate “audio and video encoding and decoding, user interface, 2D/3D graphics, and gaming…signal processing…audio and video processing, voice and facial recognition, computer vision, and deep learning.” To take advantage of these SIMD instructions, the GraalVM Enterprise 21.2 compiler has added two new vectorization optimizations to its already substantial set (see "Java and Compiler Updates" in the release notes). Throughput on some microbenchmarks has improved by about 30%!

Developer Experience

GraalVM 21.2 includes many new development tool capabilities and a number of significant improvements to GraalVM Native Image.

GraalVM Native Image uses the Graal compiler to generate native machine code from Java bytecode at build time, instead of at runtime, and generates platform specific executables for Linux, Mac, and Windows. This approach creates applications that can start up to 100 times faster and consume significantly less memory and CPU than when running on a Java Virtual Machine (JVM). Not running on a JVM means GraalVM Native Image has to provide support for features JVMs provide, but in a context where all code is compiled ahead-of-time. GraalVM 21.2 adds novel support for Java class and resource loading APIs that developers use regularly. With this new support, applications using these APIs can be compiled unchanged to machine executables, making it much easier to migrate existing applications to GraalVM Native Image.

JDK Flight Recorder (JFR) is an important and popular monitoring feature making its first appearance in GraalVM 21.2 Native Image. JFR makes it possible to collect diagnostic and profiling data from a running Java application with minimal overhead. The GraalVM 21.2 release includes the core JFR infrastructure support required to gather and report metrics from executables generated by GraalVM Native Image. Monitoring for a wide range of metrics and events will be added in upcoming releases. The introduction of low overhead JFR profiling data generation in native executables is designed to make it easier to build, deploy, and monitor these applications in production environments where performance is critical and monitoring is absolutely necessary. 

GraalVM 21.2 also includes JFR tooling enhancements. Once you've generated JFR diagnostic and profiling data, the next step is analysis and the premier tool for JFR analysis is VisualVM. VisualVM has had JFR support for a few years, but the GraalVM 21.2 release adds support for configuring which specific metrics to capture, as well as controls to start, stop, and dump data from an application running on the HotSpot JVM. Similar support for GraalVM Native Image generated executables is expected in a future release.

Source: oracle.com

Related Posts

0 comments:

Post a Comment