Application Cost Reduction With ARM Servers
Let's talk about ARM servers. They may seem unconventional, but they're worth considering, as Intel and AMD currently dominate the server hardware market.
Join the DZone community and get the full member experience.
Join For FreeThis article covers a 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.
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 (or 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 manufacturing rights to other companies who build their own products based on this design.
Due to minimal power consumption, lower development costs, and smaller chip sizes, 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 regularly. The ARM specifications are constantly enriched with new features introduced as extensions. Some of them are optional so that 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 boasts increased security with the ARM Confidential Compute Architecture and 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). BellSoft is currently working on adding ARM support to Alpaquita Linux, a minimalistic distro with a 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, and 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 that 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 in 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 in the ARM market stimulation innovations and provides 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 and power and reduce their 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 the Java ARMv8 port is stable and production-grade. It supports all major JVM features, including all mainline Garbage Collectors and Shenandoah, so that you can develop, deploy, and monitor your Java applications on Arm architecture without challenges.
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's 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 a 30% increase in app performance using the latest versions of Java and ARM servers.
Reducing Cloud Costs With ARM
Enhanced performance always comes in 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, but they can also achieve 40% better performance per dollar when translating the time to completion of SPEC tests to hours and multiplying the result by an hourly cost.
Conclusion
ARM architecture thrives and reaches new heights every year. Most importantly, 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 discovered, Java and ARM make an excellent combo!
Published at DZone with permission of Dmitry Chuyko. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments