Support
Blog chevron_right Cloud Cost

Give Your Java Applications a Performance Boost with AWS Graviton 

Give Your Java Applications a Performance Boost with AWS Graviton 

AWS introduced the Graviton family of 64-bit ARM-based CPUs in 2018, and each generation is faster than its predecessor. Azul Platform Prime, a high-performance Java platform, performs more than 30% better on Graviton4 than vanilla OpenJDK across a wide range of performance tests. In this blog post, Azul Senior Technical Writer and Java Champion Frank Delporte takes a closer look at the performance boost Platform Prime delivers on Graviton.

What is Graviton? 

The first version of AWS Graviton was released in 2018, but it has already evolved into a fourth generation, which is up to 45% faster for large Java applications than Graviton 3.

What Is Graviton?
AWS Graviton is a family of 64-bit ARM-based CPUs, known for its lower energy consumption, and was designed for use in data centers.

Azul Platform Prime’s continuous improvements on Graviton 

Azul distributes two Java Virtual Machine (JVM) runtimes. The first one, Zulu, is an OpenJDK distribution with the same code as Oracle Java SE. Zulu is available for free or with additional support and security services in the Azul Platform Core product. The second one, Zing, is an enhanced build of OpenJDK included in Azul Platform Prime, Azul’s high-performance Java platform. 

Continuous improvements of Azul Platform Prime on Graviton 

Since June 2022, Azul Platform Prime has been available for Graviton systems with CentOS, CentOS Stream, Oracle Linux, Ubuntu, and Amazon Linux. Since then, the Azul team has continuously focused on improving Azul Platform Prime’s performance for Graviton in each release. For instance, between builds 4079 and 4805 (in three months), Platform Prime’s performance improved 3.45% on Graviton4. Without any code change, just by keeping your runtime up-to-date, you can increase your system’s load and lower your total cost.

What Is Azul Platform Prime?
Azul Platform Prime is a commercial high-performance Java platform that includes Azul Zing Builds of OpenJDK, an enhanced build of OpenJDK for superior application performance, responsiveness and efficiency. Zing includes the Falcon compiler and C4 Garbage Collector and performs 20-50% faster than vanilla OpenJDK, without any code changes!
IMAGE - Figure 1: Zing version 21 performs 31.7% better than vanilla OpenJDK version 21 on Graviton 4.

Azul Platform Prime versus OpenJDK on Graviton 

Our measurements have shown a tremendous difference between Azul Platform Prime and Azul Platform Core, which is a one-to-one replacement for Oracle Java SE. For instance, with version 21, Platform Prime performs 31.7% better on Graviton4 across a wide range of performance tests. 

Azul Platform Prime on Graviton versus x86 

Tests executed on c7i.2xlarge (x86) versus r8g.xlarge (Graviton4) measured a +9% performance improvement, and a 33% lower cost for the Graviton instance (from $3,000 to $2,000 per year) [figure 1].

Figure 1: Platform Prime tests measured a +9% performance improvement.

What to expect when combining Azul Platform Prime and Graviton 

For organizations running Java workloads, combining Platform Prime and Graviton-based Amazon EC2 instances leads to a robust and cost-effective solution. It allows you to get the maximum performance out of your existing Java applications while achieving a higher throughput within the same budget. 

Switching to Graviton 

When using AWS EC2, a wide range of instances is available, allowing you to switch from similar Intel-based instances easily [Figure 2].

Graviton4 EC2 Instances 

Instance SizevCPUsMemoryNetwork BandwidthEBS Bandwidth
r8g.medium 8 GiB up to 12.5 Gbps up to 10 Gbps 
r8g.large 16 GiB up to 12.5 Gbps up to 10 Gbps 
r8g.xlarge 32 GiB up to 12.5 Gbps up to 10 Gbps 
r8g.2xlarge 64 GiB up to 15 Gbps up to 10 Gbps 
r8g.4xlarge 16 128 GiB up to 15 Gbps up to 10 Gbps 
r8g.8xlarge 32 256 GiB 15 Gbps 10 Gbps 
r8g.12xlarge 48 384 GiB 22.5 Gbps 15 Gbps 
r8g.16xlarge 64 512 GiB 30 Gbps 20 Gbps 
r8g.24xlarge 96 768 GiB 40 Gbps 30 Gbps 
r8g.48xlarge 192 1,536 GiB 50 Gbps 40 Gbps 
r8g.metal-24xl 96 768 GiB 40 Gbps 30 Gbps 
r8g.metal-48xl 192 1,536 GiB 50 Gbps 40 Gbps 
Figure 2: A wide range of instances is available when using AWS EC2.

Switching to Azul Platform Prime  

Since Platform Prime is TCK-verified and Java SE-compliant, you don’t need to recompile your code to run your Java workloads with Platform Prime. Platform Prime’s Stream builds are free for development and evaluation from the Azul download page. Stable builds containing the most recent security fixes and general improvements are only available to customers. 

Switching from any OpenJDK distribution to Platform Prime is just a matter of replacing the runtime or configuring your system to point the java command to the location where you installed Platform Prime, for instance, as explained for Debian-based systems. Platform Prime can also be used in containers, for example, to pull the Ubuntu image with JDK 21, run: 

docker pull azul/prime:21 

Java applications on Platform Prime 

It’s essential to remember that you may be using many other applications, besides those developed by your team, that also run on Java, like Kafka and other third-party tools.

Benchmark results 

Azul has an extended test bench to validate the speed improvements implemented in Platform Prime. These benchmarks confirm significant performance gains with Platform Prime compared to traditional Java runtimes running on Graviton instances [Figure 3]. 

Prime 17 vs OpenJDK 17Prime 21 vs OpenJDK 21
Graviton3 39% faster 42.8% faster 
Graviton4 33.6% faster 38.4% faster 
Figure 3: Benchmarks confirm significant performance gains with Platform Prime compared to traditional Java runtimes running on Graviton instances.

These results are an aggregation of industry standard benchmarks such as Renaissance, Dacapo, SPECjbb, and OpenJDK JMH suite, as well as custom-built benchmarks focused on commonly used coding patterns, e.g., serialization. 

To ensure we get a representative picture of real-world applications, we use a set of benchmark suites that mixes latency and throughput-focused tests. 

Conclusion  

Whether modernizing legacy Java applications or optimizing cloud-native services, Azul Platform Prime and AWS Graviton4 offer the new standard in Java workload efficiency. With unmatched performance, lower infrastructure costs, and a smooth migration path, this joint solution enables enterprises to do more with Java on AWS.

prime-cta-banner

Faster Java

Learn more about Azul Platform Prime.

Resources