JRush episode 4th: Fresh Java on modern Arm servers

 

Transcript:

Finances for something really useful, not just for hitting the world, which is probably already overheated by global warming. We see that Java moves constantly, and now the frequency and the release schedule have become more regular. We see many exciting things, but the releases are not overloaded, which is good. That’s about Java.

What about me and our company? I have worked at BellSoft for a few years. BellSoft is a unique company because it produces Liberica JDK, the default OpenJDK distribution for Spring Boot containers. It also produces Alpaquita Linux and Alpaquita Native Image Kit, which combine perfectly into the Alpaquita Cloud Native Platform (ACNP). You can learn more about this on our live stream.

I participate in the development of OpenJDK and also speak at events. The overall contribution of our company is very significant in opportunity cases. Before BellSoft, I worked at Oracle in the domain of OpenJDK development, and prior to that, I used to work at Deutsche Bank. So, the topic of financial savings and optimizations is very close to me.

Let’s look at the evolution of mobile phones. This area has developed so rapidly that you wouldn’t be able to capture a device that remains cutting-edge for even half a year. Today, we have devices that are far more modern, powerful, and capable of tasks that were once exclusive to server-class machines. Similarly, in the server domain, new hardware develops rapidly, and the software running on that hardware includes many optimizations. This trend began years ago, and ARM, as both a company and architecture, played a major role. ARM technology has grown enormously, with an estimated 250 billion processors in various devices by the end of last year.

What is an instruction set? It’s a way for software developers to communicate with hardware, telling it what to do to produce valuable results. Instruction sets have multiple versions, with major and minor updates. Among these, the application profile is particularly important for Java developers and users because it allows the JVM to run efficiently with JIT and AOT compilers that optimize runtime performance.

There are also terms like AArch64 or ARM64, denoting execution modes and specific instruction sets for those modes. A single CPU can operate in different modes, with ARM64 also serving as the Linux kernel port for this class of machines. Vendors license ARM technology, develop their hardware, and implement extensions from various specification versions to offer improved performance and features.

Extensions in ARM specifications are often related to cryptography, checksum calculations, and SIMD data processing. For example, the scalable vector extension (SVE) allows efficient computation on long streams of data, such as numerical streams or financial data. Other extensions cater to machine learning tasks. ARM-based servers like ThunderX, with their multi-core designs, demonstrate the scalability and potential of this architecture. While older machines like ThunderX had 96 cores, newer ones boast up to 384 cores, suitable for HPC and server-class workloads.

ARM’s reference designs, like Neoverse, have enabled vendors to implement high-performance hardware. Examples include Apple’s M1 and M2 processors, which exemplify how ARM cores have become increasingly powerful. The latest ARM specifications, such as ARMv9, have already been implemented in both mobile and server-class CPUs. Vendors like Amazon, through their Graviton processors, have consistently improved performance across generations. Amazon reports a 25% performance improvement in their latest generation compared to its predecessor and a tenfold improvement over earlier generations.

In the software ecosystem, ARM has gained significant traction. Most major technologies now target ARM architecture alongside x86. OpenJDK supports ARM natively, enabling optimized performance without emulation. Diagnostic tools for Java, critical for measuring performance and ensuring correctness, have also been adapted for ARM. Performance improvements in OpenJDK 11 and beyond, including intrinsics and optimized functions, further enhance the ecosystem.

Correctness remains a priority, especially for concurrent programs, as ARM hardware is less forgiving of programming errors compared to x86. ARM-based servers now feature hundreds of cores, and racks can support thousands of virtual machines. Amazon’s Graviton processors, for example, offer significant cost savings, leading to rapid growth in ARM computing across clouds.

Development hardware for ARM is now widely available, including Apple Silicon-powered machines and ARM laptops running Linux or Windows. These devices facilitate cross-development for ARM and x86 targets, allowing for multi-cloud deployment and cost-effective solutions. Major cloud providers like Amazon, Oracle, and Azure offer ARM-based instances, ensuring a broad reach for this architecture.

In conclusion, hardware and software advancements on ARM work seamlessly together, offering better performance and lower costs. With the latest Java versions and careful migration strategies, developers can achieve significant benefits. Just remember: correctness is always the responsibility of the programmer. Thank you!

Summary

The video discusses the benefits of using ARM-based hardware for developing and running Java applications. The speaker highlights the significant improvements in performance, cost-effectiveness, and development tools since the first generation of Graviton processors. They also emphasize the importance of software updates and new hardware in achieving improved results.

About Dmitry

Dmitry Chuyko is a Senior Performance Architect at BellSoft, an OpenJDK committer, and a public speaker. Prior to joining BellSoft, Dmitry worked on the Hotspot JVM at Oracle, and before that he had many years of programming experience in Java. He is currently focused on optimizing HotSpot for x86 and ARM, previously being involved in rolling out JEP 386, which enables the creation of the smallest JDK containers.

Social Media

Videos
card image
Dec 17, 2024
Master Java Profiling: Tools, Techniques, and Real-World Tips

Java profiling allows to rapidly identify and fix performance bottlenecks in your program. In this video we explain what is profiling, introduce popular profiling tools, list their pros and cons, and provide useful tips and code examples.

Videos
card image
Dec 9, 2024
How to use CRaC with Spring Boot in a Docker Container

CRaC (Coordinated Restore at Checkpoint) is an OpenJDK project designed to significantly reduce startup and warmup times of Java applications to milliseconds. This tutorial demonstrates using CRaC with a Spring Boot application running in a Docker container, specifically the Spring Boot Petclinic app (version 3.2 or later).

Further watching

Videos
card image
Jan 22, 2025
JEP 483: Ahead-of-Time Class Loading & Linking. Project Leyden in JDK 24

JEP 483 introduces Ahead-of-Time (AOT) Class Loading and Linking in JDK 24, which enhances Java application startup times by loading and linking classes ahead of time and storing them in a reusable AOT cache. This feature, part of Project Leyden, reduces the JVM's workload during startup without requiring changes to application code, though a training run mimicking production is needed to create an efficient cache. Early tests with a Spring Boot app showed significant improvements, cutting startup time from two seconds to just one second.

Videos
card image
Jan 14, 2025
How to use AppCDS with Spring Boot

This tutorial demonstrates how to use Application Class Data Sharing (AppCDS) and Ahead-of-Time (AOT) processing with Spring Boot applications to reduce startup time by 40–50%. AppCDS creates an archive of parsed classes for faster loading, requiring no code changes, and works both locally and in containers. The tutorial covers building optimized Docker images using Dockerfiles or Buildpacks for efficient deployment and improved performance.

Videos
card image
Dec 28, 2024
JDK 24: The New Features in Java 24

JDK 24 is in Rampdown Phase One, which means, we know all the JEPs targeted to this release. And there are a lot of them, so it is time to discuss this new Java release!