Architecture

ARM 64-bit is a RISC family processor.

As an old Unix user (on 68000, PA-RISC, PowerPC...) I'm a big fan of these architectures and a bit sad by the CISC (Intel/AMD) domination.

But the wheel is turning. ARM can be fast, cheap, and use less energy. Remember they are used to power your smartphone.

Chicken or egg

Classic dilema.

For a few years, some users have started asking about aarch64 builds. But as there are few users, there are few available systems and few available software. Having more users, software or systems will allow others to grow (and price to decrease).

Raspberry Pi was a small, low-cost solution, but unsuitable for a serious builder.  Other professional solutions were too expensive for a free project.

Last year I set up an aarch64 VM (emulated on x86_64) and started producing packages.

Because this solution was terribly slow (by 50, so minutes became hours), I had to reduce the target. So only a minimal set of packages and only for EL-9, which is very frustrating for me and for the repository users.

Sponsoring

A few months ago, while I was thinking about a small fundraising for a builder, Robert Scheck contacted me on behalf of ETES GmbH to find a way to thank me, support my work, and increase my motivation. We agree on the goal of an ARM server to create a RPM builder.

And this is now a reality: I have an ARM builder, see ETES sponsert ARM-Buildsystem für Remi's RPM repository (in German with English translation).

Even if I'm used to receive Paypal donations from the repository user (for hosting budget and builder), lot of support by mirror providers, and some thanks messages such testimonial of faith is really very appreciated in a world where too many users confuse free and gratis.

The beast

  • 2.2 GHz 64-core Ampere Altra processor (based on Neoverse N1)
  • 64 GB DDR4 RAM
  • 512 GB NVMe M.2 SSD
  • two boards from ADLINK Technology

Benchmark

A simple CPU benchmark says it has the same note as my (now old) x86_64 builder.

After a quick (and very simple) installation of RHEL 9.2 for aarch64 (using a free developer subscription), and the setup of my build environment, I  was able to run some comparisons and optimizations of builds.

1. a QT application

I run a build of qelectrotech on both builder.

The build takes 4' on x86_64 and 6' on aarch64. Despite this being a quite big project, it doesn't have the benefit of multiple-core parallelism.

For memory, a RPM build has a lot of steps which are not parallelized (chroot installation, link, archive...)

So for other tests, I will build PHP extensions that I usually build various time for various targets (distributions, PHP versions)

2. A small PHP extension

I run a set of builds of the ZIP extension, a small project (2 C files) which is quite common.

On x86_64

  • 24" for a single build using -j16
  • 15" average for 2 builds using -j8
  • 12" average for 3 builds using -j5

On aarch64

  • 29" for a single build using -j64
  • 15" average for 2 builds using -j32
  • 12" average for 3 builds using -j22

As this is a very small project, again no benefit from the number of cores, but same time for both builders.

3. A big PHP extension in C

I run a set of builds of GRPC extension, among the biggest ones (~2800 source files)

On x86_64

  • 4'12" for a single build using -j16
  • 3'29" average for 2 builds using -j8
  • 3'25" average for 3 builds using -j5

On aarch64

  • 2'34" for a single build using -j64
  • 2'21" average for 2 builds using -j32
  • 2'10" average for 3 builds using -j22

Here the number of cores gives a real benefit, as the aarch64 is even faster than the x86_64 one.

4. Another big PHP extension in Rust

I run a set of builds of datadog_trace extension, a terrible project in Rust using 400MB of sources

On x86_64

  • 2'38" for a single build using -j16
  • 1'30" average for 2 builds using -j8
  • 1'12" average for 3 builds using -j5

On aarch64

  • 4'44" for a single build using -j64
  • 2'55" average for 2 builds using -j32
  • 1'38" average for 3 builds using -j22

Strangely, x86_64 is slightly faster, not real difference.

5. Conclusion

This set of tests confirms that whatever the number of available cores, it is better to run various builds simultaneously. 3 or 4 seems the good choice for me as more will require more memory (chroot are stored in a 40GB tmpfs).

This new aarch64 is really an awesome builder! It will give me much more resources to build more packages. For example, I was able to rebuild the full Software Collections of PHP 7.4 to 8.3 for EL-9 (~150 extensions, more than 1000 built RPMs) in about 10 hours.

New goals

So aarch64 is now considered a primary arch for my repository

  • x86_64 and aarch64 packages are built simultaneously
  • modules and SCLs are available
  • same set of packages
  • testing packages

For now only for Enterprise Linux 9, but other distributions soon (probably EL-8, perhaps Fedora 39)

Thanks

I want to heartily thank ETES GmbH for its public support of my work and Robert Scheck for his time on this project.