Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

 
alt

Daniel Nashed

 

ARM CPU platform -- Where can it be relevant today for you?

Daniel Nashed  30 April 2023 08:12:56
Apple Silicon

Apple M1 and M2 are probably the two most known and widely spread ARM desktop and notebook ARM-based chips.
Moving from Intel x64 to ARM-based Apple Silicon is a logical step after all the mobile devices already used their own CPUs for quite a while.
The ARM platform allows Apple to combine standard chip technology with their own specific features required for Apple hardware.

Besides having better control on the chip functionality this allows Apple to add impressive battery life and very low power consumption at a much higher performance.

Reference:

https://en.wikipedia.org/wiki/Apple_silicon


Rasperry Pi


Another well-known ARM-based platform is the Raspberry Pi. Which is specially used in the consumer space for very low-footprint computing with its own application universe.
Even not having relevance in Enterprise environments, this is an interesting and important platform especially for home automation and other IoT-related use cases.
Raspberry PI OS is the standard operating system, which is based on Debian Linux. But also Ubuntu Linux and other distributions can be used on a Raspberry Pi.

References:

https://en.wikipedia.org/wiki/Raspberry_Pi
https://en.wikipedia.org/wiki/Raspberry_Pi_OS


ARM64 on Server Hardware


ARM is also starting to have significant relevance on the server market. Especially the lower price, better performance, smaller physical footprint and less power consumption, make ARM a very interesting platform.

On the server side most of the work-loads are running ARM-based Linux. Most Linux vendors support Linux already on ARM64.
Many applications are part of most Linux distributions. For example, OpenSSL, Curl, NGINX as some very prominent examples of building the base for many solutions are part of this ground infrastructure.
But looking into container-based images on Docker Hub and other registries, you can see that the Linux community embraces the ARM64 platform.

The Kubernetes platform is fully available on ARM64.

This allows you to run many internet services today on ARM.
DNS servers, NGINX reverse proxies and web servers and many other workloads are a perfect fit for ARM64 on Linux today.

I looked into two ARM-based platforms, which are both commercially available at scale


AWS Graviton


The Graviton ARM-based platform is already available in the 3rd generation. Each new generation offers better performance at even less resource consumption.
For AWS the ARM platform is an important new flagship offering. Any AWS offerings are already available on their ARM platform.

I have switched my free tier offering from Intel to ARM to take a closer look. This platform makes a lot of sense using AWS standard services and also your own application loads if your application already supports it.
You can run a mix of ARM and Intel workloads.

Currently, I am running Ubuntu 22.04 LTS, but I might have a look into Amazon Linux again because it is their native platform.

Reference:

https://aws.amazon.com/ec2/graviton/


AWS Graviton Technical Guide


If you are looking into porting your applications to ARM, you should look into the following links

https://github.com/aws/aws-graviton-getting-started
https://github.com/aws/aws-graviton-getting-started/blob/main/os.md


Ampere ARM CPU


Another interesting ARM-based chip type is Ampere.
Microsoft Azure and also the German hosting provider Hetzner GmbH provide virtual machines running on Ampere ARM CPUs.

Hetzner is my favourite hosting provider and it was like a very early x-mas present for me, that they are offering ARM-based virtual machines.
The smallest server comes with 2 CPU cores. This is the type of machine I am mostly running for my workloads.
The VM offers the same RAM and disk space and it is 30% cheaper at a better performance and less power consumption.

So I took a closer look at the new Hetzner offering and also got an Ubuntu 22.04 LTS based instance.

Reference:

https://amperecomputing.com/
https://www.hetzner.com/cloud


Porting my applications to ARM


I basically took all my native Linux-based tools, removed the CPU directive from the makefile and recompiled the code 1:1 on ARM.
The resulting code is running on all ARM-based VMs if the used libs fit. For example for applications leveraging OpenSSL the used version must match.
So it is generally recommended to build a platform shipping with the same major version of OpenSSL, you are targeting.

But from the ARM side, I did not run into any surprises and it was a very straightforward process.
One of my applications implements a native NGINX module, which is compiled along with NGINX in my container build flow.
Another one is an own command line based on OpenSSL.

Earlier I also looked into cross-compiling on a Linux-based Intel machine to run applications on my Mac Mini with M2 CPU.
But using a native ARM platform to build your applications makes a lot more sense if you have all the build tools available. In my case, this is just a simple makefile.

Example:


file nshcertool

nshcertool: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=9ab66c06866bc3ad00ddcb9d61faf5d7a5c135a0, for GNU/Linux 3.7.0, with debug_info, not stripped

---

ldd nshcertool

       linux-vdso.so.1 (0x0000ffff8e3d4000)
       libcrypto.so.3 => /lib/aarch64-linux-gnu/libcrypto.so.3 (0x0000ffff8df60000)
       libssl.so.3 => /lib/aarch64-linux-gnu/libssl.so.3 (0x0000ffff8deb0000)
       libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff8dd00000)
       /lib/ld-linux-aarch64.so.1 (0x0000ffff8e39b000)


Conclusion:


You can see from the examples of what AWS Graviton and hosting providers already provide, that ARM-based CPU have relevance in the server space today.
I will continue to look into the ARM platform for all of my tools, which can be ported to ARM already.
This will help to run on Apple Silicon and offer support for server-based ARM platforms.

NGINX servers, DNS servers, file servers and also backup targets for example running a ZFS host to store my backups, are already very interesting use cases.
Many applications are natively available and even offer a container image. Which also can run on Kubernetes. I have already installed a K3s node on my Hetzner ARM VM on Ubuntu.
This will be probably worth a separate blog post.

Comments
No Comments Found

Links

    Archives


    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]