Java Is Greener on Arm
Hardware and software are evolving in parallel, and combining the best of modern software development with the latest Arm hardware can yield impressive results.
Join the DZone community and get the full member experience.
Join For FreeEven those not particularly interested in computer technology have heard of microprocessor architectures. This is especially true with the recent news that Qualcomm is rumored to be examining the possibility of acquiring various parts of Intel and Uber is partnering with Ampere Computing.
Hardware and software are evolving in parallel, and combining the best of modern software development with the latest Arm hardware can yield impressive performance, cost, and efficiency results.
Why Arm?
Arm is a member of the Reduced Instruction Set Computer (RISC) architecture family, a type of microprocessor architecture based on a small, highly optimized set of instructions. Other known representatives of this family are RISC-V, SPARC, and MIPS. Initially, the RISC family aimed for embedded and related markets, but soon overgrew to new potential, with Arm emerging as the most popular so far.
Today, Arm competes with x86 (based on the CISC approach) in cloud computing, and here are two key differences between CISC and RISC that you need to know.
The first is the way instructions are executed. Both approaches attempt to increase CPU performance, but in different ways:
- RISC reduces the number of cycles per instruction at the expense of the number of instructions per program.
- CISC minimizes the number of instructions per program, but this comes at the cost of an increased number of cycles per instruction.
The second difference is the licensing approach. Both x86 and Arm are open-source architectures that are available for production through licensing. However, x86 was historically developed by Intel: the name "x86" is derived from the 8086, an early processor released by the company. Today, only three companies hold licenses to build hardware with this architecture type, and Intel remains the largest shareholder in this market.
Arm licenses are easier to get, so Arm manufacturing is very competitive. In some ways, the Arm licensing approach has allowed this hardware to flourish and evolve so quickly. Originally conceived as a solution for embedded and related applications, Arm has undergone many expansions and can now be found in desktop processors like M3 and M4 chips, mobile phones, automobiles, and almost everywhere else.
Modern Java Enhancements for Arm
The Java community recognized Arm's potential a while ago and has successfully completed several initiatives to optimize Java for working on Arm.
The first AArch64 project was implemented as part of OpenJDK, delivering a Linux/AArch64 port to JDK 9. This has had a major impact on the way Java is used today.
The following Java 11 brought many optimizations to the port initiated in JEP 315: Improve Aarch64 intrinsics. Improvements of this JEP were CPU-specific and helped improve all operating systems. In the subsequent OpenJDK releases of Java 16 and Java 17, two important ports were established: Windows/AArch64 (JEP 388) and macOS/AArch64 (JEP 391), giving you full-fledged Java options on almost all popular operating systems.
Today, as a developer, you can find Java on Arm in mature and modern Java releases. In addition to Java on Arm, you have the choice of small base Linux container images on Arm to further benefit from this architecture.
Java on Arm presents a particular interest for enterprise development and DevOps looking to enable greater efficiency and lower costs. Migrating to Aarch64 is easy, using either an x86 emulation or an Arm native JDK.
Arm Hardware Review in Different Clouds
Since the software side is set up to work on Arm, with most Linux distributions and other critical projects (for the web) already available and supported, there is freedom in your choice of Arm hardware. Let's take a closer look at what Arm-based servers, which are now gaining ground in cloud services, can do for us.
Arm-based servers are server machines that use processors based on the Arm architecture and are becoming increasingly popular in data centers, cloud computing, and various enterprise applications.
The growing adoption of Arm-based servers is driven by several factors, including their energy efficiency, cost-effectiveness, and scalability. In addition, increasing support from operating system vendors, open-source projects, and cloud service providers is helping to make Arm server solutions more accessible and practical for enterprise applications.
Arm's key players on the server side are represented by GCP, AWS, Azure, and OCI.
AWS Graviton
The latest AWS Graviton4, like all the other AWS Graviton processors, uses a 64-bit Arm instruction set architecture. AWS Graviton4-based Amazon EC2 R8g instances deliver up to 30% better performance than AWS Graviton3-based Amazon EC2 R7g instances. This processor is ideal for demanding workloads such as high-performance databases, in-memory caches, and real-time big data analytics. AWS Graviton is an example of Neoverse architecture, made for handling a wide range of cloud-native workloads at world-class levels of performance, efficiency, and compute density. This architecture is great for the cloud. In 2024, Arm announced Neoverse V3 with up to 128 cores, targeting the highest-performance applications.
Google Axion Processors
In April 2024, Google announced its new Arm-based Axion Processors, promising up to 30% better performance than the fastest general-purpose Arm-based instances available in the cloud, up to 50% better performance, and up to 60% better energy efficiency than comparable current-generation x86-based instances. Axion processors, just like AWS Graviton4, are built using the Arm Neoverse: the Neoverse V2 CPU.
As many have noted, this product release puts Google in direct competition with Amazon, leading the market with Amazon Web Services (AWS) and the rest of the existing players with their Arm-based servers.
Azure Cobalt 100 Arm-Based Processor
In May 2024, Microsoft announced the preview of a new Azure Cobalt 100 Arm-based processor. The Cobalt 100 processor is another representative of Arm Neoverse. It uses an N-series (N2) Arm CPU design, enabling optimized performance of scale-out cloud-based applications.
In general, Microsoft pays a lot of attention to Arm, in parallel investing in developer platforms and language optimization on Linux and Windows for Arm. This includes NET 8 numerous enhancements for Arm and C++, introduced in Visual Studio 17.10 SQL Server Data Tools (SSDT) for the Arm native Visual Studio.
Ampere A1 Compute by Oracle
In May 2021, Oracle released its first Arm-based computing product: the OCI Ampere A1 Compute. The product runs on Oracle Cloud Infrastructure (OCI). The main model is VM.Standard.A1.Flex (OCI A1), whose CPU core and memory can be flexibly configured with VM shapes scale from 1 to 156 cores and 1 to 64 GB of memory per core. The flexible approach allows unique settings for your own project needs, matching your workload requirements and saving the cost spent unnecessarily. Tests for widespread AI interference show AmpereOne A2 as a highly competitive and compelling product.
Oracle also promotes Arm technology via the Arm developer ecosystem and partnerships with Ampere Computing, Arm, GitLab, Jenkins, and others.
Arm Prospectus
With all of the big technological names currently involved in Arm-based hardware production, bolstered by Arm's continued improvements on the software side, Arm's popularity may soon overtake x86. According to ARM CEO Rene Haas, Arm will have a 50% market share in five years.
The Arm-based servers featured here offer impressive performance and efficiency for cloud-native workloads and are particularly relevant to the big data and AI industries. Moving your workloads to an Arm-based architecture is comparatively easy and guarantees significant budget reductions.
Neoverse is a certain choice for servers aimed at working with large volumes of information in the cloud, with the latest examples from Microsoft, Google, and AWS.
Along with the Arm rise, the Java ecosystem continues to get further enhancements for working on it. The expanding ecosystem ready for Arm includes Linux distributions, Java and OpenJDK runtimes, frameworks, and main infrastructure systems (web servers, Spark, Kafka, Cassandra, Elastic, and others). The goodwill of the Java community to enhance the ecosystem for working with Arm indicates that Arm is becoming a tier-one hardware platform.
Containers — highly valued for their isolation and security, portability, and reproducibility — are adapted to Arm, so you can get small Linux containers tuned for Java today for free. Docker is investing in the Arm space by ensuring that the Docker Desktop runs natively on Windows on Arm.
The latest Arm technology is well-suited for modern Java workloads. Moving an OpenJDK application to an Arm-based server is a smart way to improve Java performance and reduce resource consumption. Adding Arm-optimized Linux-based containers to your Java applications goes one step further, giving you the most complete Java on Arm solution for a sustainable and robust Java experience. As a result, enterprises are increasingly turning to the Arm architecture to reduce costs and power utilization. A future roadmap/prospectus may include an increased focus on Arm hardware with even better efficiency results.
Opinions expressed by DZone contributors are their own.
Comments