Posts

Application cost reduction with Arm servers

Jun 5, 2023
Dmitry Chuyko
14.7

This article covers the topic that may seem unusual, namely the Arm servers. For most developers, Arm is a dark horse in the world of server-class hardware dominated by Intel and AMD. But in truth, Arm servers have been around for a decade and are becoming increasingly popular thanks to their improved performance coupled with low maintenance costs. Let’s look into their capabilities and see how your applications can benefit from migrating to this architecture.

This article follows my talk on JRush Episode 4 dedicated to modern Java development for banking and FinTech. If you prefer watching a presentation to reading the article, you can register for free and enjoy three presentations by leading IT experts. You will also gain access to the previous episodes covering the latest trends and cutting-edge solutions in the Java industry.

Watch Jrush for free

What is ARM architecture? 

The Advanced RISC Machine (ARM) processors form a family of Central Processing Units (CPUs) based on the RISC instruction set architecture (ISA). ISA provides an interface between software and hardware specifying how the software can manage the CPU. It defines the supported instructions, data types, registers, memory management, etc.

RISC ISA is a reduced instruction set computer architecture, which uses smaller and simpler instructions given to the computer to perform its tasks as opposed to CISC, which utilizes complex instructions. As a result, each program utilizes several instructions, which are rapidly accomplished, making Arm processors highly performant and significantly more power-efficient than Intel processors. Intel and AMD use the AMD64 (also known as x86-64) instruction set with various extensions. To run a program on an Intel or ARM processor, we need to recompile it with a compiler. The same is true for managed runtimes that compile the code written in one of the high-level languages to native machine code that can be executed by the processor.

The first properly working samples of Arm processors appeared in 1985. Arm architecture rapidly gained popularity. To compare: 30 billion processors were shipped in 2013, but by 2022, this number reached 230 billion. Remarkably, ARM Ltd. doesn’t manufacture the chips. Instead, it licenses the rights for manufacture to other companies who build their own products based on this design.

Due to minimal power consumption, lower development costs, and smaller chip size, Arm processors are primarily used in smartphones and embedded systems. But in recent years, Arm started conquering other fields such as

  • Personal computers (Apple M1 chips) and servers;
  • High-performance computing (the Fugaku supercomputer is based on the Arm architecture);
  • Cloud computing;
  • Edge computing.

Arm evolution

The Arm ecosystem extends on a regular basis. The Arm specifications are constantly enriched with new features introduced as extensions. Some of them are optional, so you can choose a CPU exactly for your needs. At the same time, older extensions can also be supported. This flexibility is Arm’s distinctive advantage.

The graph below depicts the evolution of the specification for ARMv8-A and v9-A (application architecture profile):

ARM Specification Progression

In 2021, the next-generation Arm CPU Armv9 was launched, the first new Arm architecture in a decade. It boosts increased security with the Arm Confidential Compute Architecture, as well as enhanced ML and AI capabilities. The new processor is promised to accelerate the transition from general-purpose to more specialized processing across all IT fields.

Arm architecture is supported by numerous software technologies, including

  • Operating systems (all major Linux distributions, including Debian, Ubuntu, RHEL, openSUSE, and OEL). We are currently working on adding Arm support to our Alpaquita Linux, a minimalistic distro with the base image of 3.32 MB (with optimized musl) and 8.4 MB (with glibc);
  • Middleware such as OpenJDK, Elasticsearch, Apache Kafka, Apache Spark, and Elastic Cassandra;
  • Container technologies — Docker and Kubernetes;
  • Virtualization solutions, for instance, KVM;
  • Data management systems like Hadoop, MySQL, MariaDB.

And many other tools.

But the most important thing is that cloud adoption of Arm architecture proceeds by leaps and bounds. Arm-based systems power the instances in Amazon, Oracle Cloud, Azure, and other cloud environments. It is also possible to buy physical servers developed by Ampere. Moreover, Kubernetes works on Arm and enables the creation of heterogeneous clusters, so you can spread the workloads across various architectures based on your business needs. For instance, Apache Pulsar, a highly scalable and low-latency messaging platform has recently got an official container image for linux/arm64, so you don’t have to use emulation that affects the performance.

Why Arm servers?

Why would enterprises invest into migrating their data centers to Arm-based servers from tried-and-true Intel which has dominated this field for decades? The answer is: long-term cost efficiency. 

As the amounts of data processed by large enterprises increase in a geometric progression, data centers literally become the hot spots of IT infrastructure. On the one hand, servers get faster and more powerful to handle heavier loads, but on the other, they devour more space and power. Data centers also have to be cooled and maintained, and increasing the density of machines only deteriorates the situation. These issues raise the demand for smaller, flexible, low-energy, and yet performant processors.

This is where Arm comes into play with the following substantial advantages:

  • Lower power consumption and relatively low Thermal Design Power (TDP) compared to similar Intel solutions;
  • High flexibility to choose an optimal processor for various tasks and modularity to design custom processors tailored to specific workloads. The space savings go even further, because you can divide physical servers into numerous virtual machines or rent the VMs in the cloud;
  • Healthy competition on the Arm market stimulation innovations and providing end-users with affordable technologies; 
  • Excellent performance of server-class Arm processors.

Regarding the last bullet point — how powerful can an Arm processor be? The AmpereOne™ 64-bit multi-core processors can have up to 192 single-threaded cores and are capable of handling the densest deployments and the most demanding compute installations in the world. At the same time, this processor family provides the most cores per rack, allowing enterprises to save space, power, and reduce carbon footprint.

Therefore, you can select optimal Arm processors for any need, be it ultra-low-power embedded systems, high performance computing, statistical and financial math computations, or AI/ML-workloads.

Java on Arm

The BellSoft engineers were among the first who saw great prospects for Java on Arm and took an active part in making Java a perfect fit for this architecture. Namely, they enhanced the performance of the AArch64 port of OpenJDK by proposing and integrating JEP315: Improve Aarch64 Intrinsics. And today, BellSoft is one of the most active contributors to the AArch64 port of OpenJDK.

If your application is based on Java, you can consider migrating the workloads to Arm architecture, because Java Armv8 port is stable and production grade. It supports all major JVM features, including all mainline Garbage Collectors and Shenandoah, so you can develop, deploy, and monitor your Java applications on Arm architecture without challenges. You can read more about the performance of Java Arm port as compared to other architectures in our dedicated article.

Having a native JVM for a given architecture is essential for application performance. When we introduced native Liberica JDK builds for Arm-based Apple Silicon chips in 2021, we benchmarked two JDK implementations: macOS-x86_64 on Rosetta 2 and macOS-aarch64. The results demonstrated almost two times the difference in performance for some workloads! Therefore, if you want to get the maximum out of Arm servers, select a runtime that supports this architecture, such as Liberica JDK that runs natively on Arm.

Download Liberica JDK

Performance of Arm servers

Arm servers are getting more powerful with each version. Let’s look at the comparison of three Graviton generations offered in AWS to trace the evolution of the architecture:

Evolution of Arm servers in AWS

According to Amazon post-marketing study, customers utilizing the Graviton3-based C7g instances powered by Graviton3 noticed up to 40% performance improvement compared to C6g instances running on Graviton2.

At the same time, Java is getting more performant, too. There have been twelve JDK releases since Java 8, the most popular version, and each of them contains new features targeted to optimize memory consumption and increase Java speed. Let’s now compare the performance of JDK 8 and 20 on the cloud Arm servers using the DaCapo benchmark:

Benchmarking JDK 8 vs 20 on Arm servers

The data above demonstrates that we can reach more than 30% increase in app performance using the latest versions of Java and Arm servers.

Reducing cloud costs with Arm and Liberica Lite

Enhanced performance always comes handy, and power-efficiency helps to save budgets in the long term, but what if a company is looking for immediate cost reduction seeing that its cloud bills inflate uncontrollably? Arm servers can be a remedy in this situation.

A comparative analysis of Arm, AMD, and Intel costs in the Amazon cloud has shown that Graviton2 processors can be significantly more cost-efficient than other platforms. The study compared the 16xlarge instances based on the m6g (Graviton2, Arm), m5a (EPYC1, AMD), and m5n (Xeon Cascade Lake, Intel) for the 64-vCPU count. Not only are the Arm-based instances cheaper than AMD and Intel, they can achieve 40% better performance per dollar when translating the time to completion of SPEC tests to hours and multiplying the result by hourly cost. 

You can also reduce cloud costs by migrating to Java microcontainers and reducing memory consumption. For that purpose, BellSoft provides Liberica Lite optimized for memory footprint in the cloud environment. Containers with Liberica Lite can be 1.5 smaller than those based on other popular Java runtimes. What is more, we added the support for Aarch64 as part of our efforts in porting Alpine Linux to OpenJDK, so now developers can use our smallest containers on the market of only 42 MB on this architecture, too!

If you want to know more about the technical capabilities of Liberica JDK and how it will enable you to unify the whole corporate Java stack, download the white paper by clicking on the button below.

Get Liberica JDK white paper

Conclusion

Arm architecture thrives and reaches new heights every year. Most importantly, there is no shortage of software tools and platforms that function consistently on Arm. So if you have a cloud-native Java application, consider migrating it to this power-efficient and highly performant architecture — as we found out, Java and Arm make an excellent combo!

Subcribe to our newsletter

figure

Read the industry news, receive solutions to your problems, and find the ways to save money.

Further reading