# XZ compression performance on Ampere Altra

**URL:** <https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961>\
**Category:** General Discussion\
**Created:** [October 10, 2024, 5:24pm UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961 "2024-10-10T17:24:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheComputerGuy](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/thecomputerguy/32/509_2.png) [@TheComputerGuy](https://community.amperecomputing.com/u/TheComputerGuy)\
**Post date:** [October 10, 2024, 5:24pm UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/1 "2024-10-10T17:24:44Z")

</div>

I’m curious what sort of compression performance Ampere Altra and maybe AmpereOne has to offer with xz. I’m looking into if Ampere Altra could be a suitable replacement for Nix’s CI host server. Right now, we run a Ryzen 5950X and we’re experiencing high temps which is causing throttling. Some of the infra folks are looking into replacements and I’m looking into what Ampere can offer in that regards. Compression is the primary workload we need the most performance in.

---

<div class="post-metadata">

**Author:** ![vielmetti](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/vielmetti/32/61_2.png) [@vielmetti](https://community.amperecomputing.com/u/vielmetti)\
**Post date:** [October 10, 2024, 5:40pm UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/2 "2024-10-10T17:40:19Z")

</div>

Are you compressing a few big files or lots of little ones?

I see “pixz” which is a multicore / manycore version of “xz”, a few years old, don’t have any personal experience with it but I’d look at this:

> **[GitHub - vasi/pixz: Parallel, indexed xz compressor](https://github.com/vasi/pixz)**
>
> Parallel, indexed xz compressor

to see how it affects your workflow.

---

<div class="post-metadata">

**Author:** ![TheComputerGuy](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/thecomputerguy/32/509_2.png) [@TheComputerGuy](https://community.amperecomputing.com/u/TheComputerGuy)\
**Post date:** [October 10, 2024, 5:42pm UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/3 "2024-10-10T17:42:31Z")

</div>

We’re compressing packages, Nix is a package manager and the compression we do is the output of every derivation. So there’s a mix of a lot of big and small stuff. Also, heard that pixz might not help because the workloads are CPU bound and that more threads to a process doesn’t help.

---

<div class="post-metadata">

**Author:** ![bexcran](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/bexcran/32/188_2.png) [@bexcran](https://community.amperecomputing.com/u/bexcran)\
**Post date:** [October 13, 2024, 3:14am UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/4 "2024-10-13T03:14:46Z")

</div>

If you have a newer version of `xz`, it’ll use multiple cores by default. On older 5.4.x versions you can set `-T threads` manually since the default is 1. You can see the man page at [xz(1) — xz](https://manpages.opensuse.org/Tumbleweed/xz/xz.1.en.html).

---

<div class="post-metadata">

**Author:** ![TheComputerGuy](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/thecomputerguy/32/509_2.png) [@TheComputerGuy](https://community.amperecomputing.com/u/TheComputerGuy)\
**Post date:** [October 13, 2024, 5:04am UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/5 "2024-10-13T05:04:07Z")

</div>

I’m aware but I’m wondering if there’s any existing benchmarks of XZ’s performance on the Ampere Altra.

---

<div class="post-metadata">

**Author:** ![quocbao](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/quocbao/32/1035_2.png) [@quocbao](https://community.amperecomputing.com/u/quocbao)\
**Post date:** [October 13, 2024, 11:37am UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/6 "2024-10-13T11:37:46Z")

</div>

Send me the test, and I will help you run it on my Q64-22 machine, AMD 5965WX or 2x Xeon 8272CL.

I previously did a compression test with `zstd` against `2x Xeon Platinium 8272CL`. My single Q64-22 finished in `29 seconds` and only consumed `~32W`. The dual Xeon only needs `25.5 seconds` but consumes about `~365W`.

---

<div class="post-metadata">

**Author:** ![TheComputerGuy](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/thecomputerguy/32/509_2.png) [@TheComputerGuy](https://community.amperecomputing.com/u/TheComputerGuy)\
**Post date:** [October 13, 2024, 3:34pm UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/7 "2024-10-13T15:34:52Z")

</div>

I don’t have a benchmark for XZ because I haven’t figured out the best way to benchmark it on my Q64-22. I was thinking someone who has an Ampere system already benchmarked XZ at some point.

---

<div class="post-metadata">

**Author:** ![David.Zeng](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@David.Zeng](https://community.amperecomputing.com/u/David.Zeng)\
**Post date:** [May 9, 2025, 1:55am UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/8 "2025-05-09T01:55:17Z")

</div>

Are you still interested on this benchmark? How about this benchmark from PTS: [XZ Compression Benchmark - OpenBenchmarking.org](https://openbenchmarking.org/test/pts/compress-xz)

---

<div class="post-metadata">

**Author:** ![TheComputerGuy](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/thecomputerguy/32/509_2.png) [@TheComputerGuy](https://community.amperecomputing.com/u/TheComputerGuy)\
**Post date:** [May 9, 2025, 2:57am UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/9 "2025-05-09T02:57:24Z")

</div>

Yes, that looks interesting. I just need to figure out how to run this benchmark on my hardware.

---

<div class="post-metadata">

**Author:** ![David.Zeng](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@David.Zeng](https://community.amperecomputing.com/u/David.Zeng)\
**Post date:** [May 9, 2025, 6:50am UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/10 "2025-05-09T06:50:39Z")

</div>

If you don’t want to run the whole PTS stack, here is a quick step:  
wget [http://old-releases.ubuntu.com/releases/16.04.3/ubuntu-16.04.3-server-i386.img](http://old-releases.ubuntu.com/releases/16.04.3/ubuntu-16.04.3-server-i386.img)  
wget [http://distfiles.macports.org/xz/xz-5.2.4.tar.bz2](http://distfiles.macports.org/xz/xz-5.2.4.tar.bz2)  
tar -xvf xz-5.2.4.tar.bz2  
cd xz-5.2.4/  
./configure  
make -j  
cd ..  
time ./xz-5.2.4/src/xz/xz -7 -k -T0 ubuntu-16.04.3-server-i386.img

But please aware that xz has a limitation that maximum 16 threads are used. So you can run multiple compression at same time to use all your 64 cores.

---

<div class="post-metadata">

**Author:** ![TheComputerGuy](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/thecomputerguy/32/509_2.png) [@TheComputerGuy](https://community.amperecomputing.com/u/TheComputerGuy)\
**Post date:** [May 9, 2025, 3:51pm UTC](https://community.amperecomputing.com/t/xz-compression-performance-on-ampere-altra/961/11 "2025-05-09T15:51:41Z")

</div>

Cool, I’ll give this a try eventually. Though since making the post, my core count has doubled.
