Fedora build benchmarks on SpacemiT K3 (RVA23 hardware) #17

Open
opened 2026-05-12 13:12:31 +00:00 by kashyapc · 7 comments
Owner

I got remote access to SpacemiT K3 for a couple of weeks. Do some benchmarks of classic Fedora build:

  • kernel
  • glibc
  • llvm
  • firefox
  • qemu
  • binutils
  • and a few others

We can get the build times for SiFive HiFive Premier P550 and Milk-V Megrez and others from the RISC-V Koji server.

Benchmark procedure

I'm running inside a Fedora 43 RISC-V container on a SpacemiT K3 host running on "Bianbu OS" (Debian-based).

  • Get the RPM from RISC-V Koji or in kernel's case get it from the "omni" kernel Copr:
  • Install the build dependencies: dnf builddep -y ./rpmbuild/SPECS/kernel.spec
  • Build it: time rpmbuild -ba ./rpmbuild/SPECS/kernel.spec
I got remote access to SpacemiT K3 for a couple of weeks. Do some benchmarks of classic Fedora build: - kernel - glibc - llvm - firefox - qemu - binutils - and a few others We can get the build times for SiFive HiFive Premier P550 and Milk-V Megrez and others from the RISC-V Koji server. ### Benchmark procedure I'm running inside a Fedora 43 RISC-V container on a SpacemiT K3 host running on "Bianbu OS" (Debian-based). - Get the RPM from RISC-V Koji or in kernel's case get it from the "omni" kernel Copr: - Install the build dependencies: `dnf builddep -y ./rpmbuild/SPECS/kernel.spec` - Build it: `time rpmbuild -ba ./rpmbuild/SPECS/kernel.spec`
Author
Owner

(NB: These are all 'rough numbers' that are close enough to give a sense of the improvement. Build times are affected by variables not in our control, e.g. NVMe vs SATA, or CPU frequency.)

Glibc

Package K3 P550[1] Megrez[2]
glibc 2h:12m 3h:46m 4h:18m

K3 is 1.95x faster than Megrez, while it is 1.71x faster than P550.

(Here "P550" == "SiFive HighFive Premier P550")

[1] https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=206124
[2] https://riscv-koji.fedoraproject.org/koji/buildinfo?buildID=62799

(NB: These are all 'rough numbers' that are close enough to give a sense of the improvement. Build times are affected by variables not in our control, e.g. NVMe vs SATA, or CPU frequency.) **Glibc** | Package | K3 | P550[1] | Megrez[2] | |-|-|-|-| | glibc | 2h:12m | 3h:46m | 4h:18m | K3 is **1.95x** faster than Megrez, while it is **1.71x** faster than P550. (Here "P550" == "SiFive HighFive Premier P550") [1] https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=206124 [2] https://riscv-koji.fedoraproject.org/koji/buildinfo?buildID=62799
Author
Owner

Kernel — this is the RISC-V omni kernel build:

https://copr.fedorainfracloud.org/coprs/g/forge-riscv-members/riscv64_omni_kernel/builds/

  • K3: ~3h24 minutes (this needed some intervention, see below)
  • Copr omni kernel build (qemu-user-static on powerful x86): 6h
  • P550 Premier: 9h
Package K3 P550[1] Copr (qemu-ser-static on x86)[2]
kernel 3h:24m 9h 6h

K3 is 2.65x faster than P550 Premier; while it's 1.7x faster vs Copr (QEMU on x86).

[1] https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=144698
[2] https://copr.fedorainfracloud.org/coprs/g/forge-riscv-members/riscv64_omni_kernel/build/10438338/


Intervention on K3: disable BTF kernel module

I had to disable BTF because I was hitting a crash with this error:

...
libbpf: btf: type [23553]: referenced type [69632] is not FUNC_PROTO
Failed to parse base BTF './vmlinux': -22
...

I got the Fedora omni kernel build from here:

$ rpm -ivh https://download.copr.fedorainfracloud.org/results/@forge-riscv-members/riscv64_omni_kernel/fedora-43-riscv64/10358297-kernel/kernel-6.19.14-200.0.riscv64.omni.fc43.src.rpm

Disabled the BTF module:

$ cd ./rpmbuild/BUILD/kernel-6.19.14-build/kernel-6.19.14/linux-6.19.14-200.0.riscv64.omni.fc43.riscv64/
$ ./scripts/config --disable DEBUG_INFO_BTF --disable DEBUG_INFO_BTF_MODULES

$ grep INFO_BTF .config
# CONFIG_DEBUG_INFO_BTF is not set
# CONFIG_DEBUG_INFO_BTF_MODULES is not set

Recompile. The build succeeds in ~3h24 minutes:

$ make olddefconfig
$ time rpmbuild -ba --noprep /root/rpmbuild/SPECS/kernel.spec |& tee take3_kernel_build_no_BTF.txt
...
Wrote: /root/rpmbuild/RPMS/riscv64/kernel-debuginfo-6.19.14-200.0.riscv64.omni.fc43.riscv64.rpm
[...] 
real    204m44.593s
user    1031m6.288s
sys     127m10.717s
**Kernel** — this is the RISC-V omni kernel build: https://copr.fedorainfracloud.org/coprs/g/forge-riscv-members/riscv64_omni_kernel/builds/ - K3: **~3h24** minutes (this needed some intervention, see below) - Copr omni kernel build (`qemu-user-static` on powerful x86): **6h** - P550 Premier: **9h** | Package | K3 | P550[1] | Copr (`qemu-ser-static` on x86)[2] | |-|-|-|-| | kernel | 3h:24m | 9h | 6h | K3 is **2.65x** faster than P550 Premier; while it's **1.7x** faster vs Copr (QEMU on x86). [1] https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=144698 [2] https://copr.fedorainfracloud.org/coprs/g/forge-riscv-members/riscv64_omni_kernel/build/10438338/ ------ #### Intervention on K3: disable BTF kernel module I had to disable BTF because I was hitting a crash with this error: ``` ... libbpf: btf: type [23553]: referenced type [69632] is not FUNC_PROTO Failed to parse base BTF './vmlinux': -22 ... ``` I got the Fedora omni kernel build from here: ``` $ rpm -ivh https://download.copr.fedorainfracloud.org/results/@forge-riscv-members/riscv64_omni_kernel/fedora-43-riscv64/10358297-kernel/kernel-6.19.14-200.0.riscv64.omni.fc43.src.rpm ``` Disabled the BTF module: ``` $ cd ./rpmbuild/BUILD/kernel-6.19.14-build/kernel-6.19.14/linux-6.19.14-200.0.riscv64.omni.fc43.riscv64/ $ ./scripts/config --disable DEBUG_INFO_BTF --disable DEBUG_INFO_BTF_MODULES $ grep INFO_BTF .config # CONFIG_DEBUG_INFO_BTF is not set # CONFIG_DEBUG_INFO_BTF_MODULES is not set ``` Recompile. The build succeeds in **~3h24 minutes**: ``` $ make olddefconfig $ time rpmbuild -ba --noprep /root/rpmbuild/SPECS/kernel.spec |& tee take3_kernel_build_no_BTF.txt ... Wrote: /root/rpmbuild/RPMS/riscv64/kernel-debuginfo-6.19.14-200.0.riscv64.omni.fc43.riscv64.rpm [...] real 204m44.593s user 1031m6.288s sys 127m10.717s ```
Author
Owner

QEMU

Package K3 P550[1]
qemu 1h 6h4m

K3 is 6x faster than P550 here.

[1] https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=144923


Intervention on K3: Disable debuginfo packages

Oddly enough, I was hitting these 'debugedit' errors, which we were resolved in #1)

[...]
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-alpha-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-aarch64-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-aarch64_be-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-arm-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-armeb-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-hexagon-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-hppa-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-i386-static: Bad string pointer index 4294967198 for unit name (.debug_line_str)
error: Bad exit status from /var/tmp/rpm-tmp.Gm3xvj (%install)
[...]

For now, I reran the build by disabling generation of debug packages, then it succeeded.

$ rpmbuild -ba --nodebuginfo /root/rpmbuild/SPECS/qemu.spec
**QEMU** | Package | K3 | P550[1] | |-|-|-| | qemu | 1h | 6h4m | K3 is **6x** faster than P550 here. [1] https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=144923 --- #### Intervention on K3: Disable debuginfo packages Oddly enough, I was hitting these 'debugedit' errors, which we were resolved in https://forge.fedoraproject.org/riscv/planning/issues/1) ``` [...] debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-alpha-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-aarch64-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-aarch64_be-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-arm-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-armeb-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-hexagon-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-hppa-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) debugedit: /root/rpmbuild/BUILD/qemu-10.1.5-build/BUILDROOT/usr/bin/qemu-i386-static: Bad string pointer index 4294967198 for unit name (.debug_line_str) error: Bad exit status from /var/tmp/rpm-tmp.Gm3xvj (%install) [...] ``` For now, I reran the build by disabling generation of debug packages, then it succeeded. ``` $ rpmbuild -ba --nodebuginfo /root/rpmbuild/SPECS/qemu.spec ```
Author
Owner

xz compression test on K3:

It is based on this previous benchmark I did which has numbers for P550 and DP-1000. The only twist here is for 16 threads, I made the script use the AI cores (based on these notes):

CMD="echo \$\$ > /proc/set_ai_thread; exec xz $LEVEL -T$T -c \"$ISO_FILE\" > /dev/null 2>&1"

Raw numbers:

--- Benchmarking xz Scaling on SpacemiT K3 ---
Target: Fedora-Workstation-43.iso (Level -6)
------------------------------------------------------------------
Threads   | Real Time | User Time (s) | CPU % | RAM (est)
------------------------------------------------------------------
 1        | 29:02.14  | 1735.77s      | 99%   | ~94MB
 4        | 7:07.61   | 1701.66s      | 398%  | ~376MB
 8        | 4:13.44   | 1918.93s      | 758%  | ~752MB
 8 (AI)   | 7:43.15   | 3672.48s      | 794%  | ~1504MB
------------------------------------------------------------------

Initial observations:

  • It looks like the workload got pinned just to the AI cores (A100), instead of being spread over all sixteen cores. So just eight AI cores were used, not the combination of both X100 (for general-purpose computing) and A100 (for AI workloads)
  • The AI cores are not ideal for compression.
`xz` compression test on K3: It is based on this [previous benchmark]( https://kashyapc.fedorapeople.org/risc-v/notes/p550-vs-dp1000-xz-bench.html) I did which has numbers for P550 and DP-1000. The only twist here is for 16 threads, I made the script use the AI cores (based on these [notes](https://github.com/sanderjo/SpacemiT-K3-X100-A100/blob/main/processes_on_higher_cores.md)): ``` CMD="echo \$\$ > /proc/set_ai_thread; exec xz $LEVEL -T$T -c \"$ISO_FILE\" > /dev/null 2>&1" ``` Raw numbers: ``` --- Benchmarking xz Scaling on SpacemiT K3 --- Target: Fedora-Workstation-43.iso (Level -6) ------------------------------------------------------------------ Threads | Real Time | User Time (s) | CPU % | RAM (est) ------------------------------------------------------------------ 1 | 29:02.14 | 1735.77s | 99% | ~94MB 4 | 7:07.61 | 1701.66s | 398% | ~376MB 8 | 4:13.44 | 1918.93s | 758% | ~752MB 8 (AI) | 7:43.15 | 3672.48s | 794% | ~1504MB ------------------------------------------------------------------ ``` Initial observations: - It looks like the workload got pinned _just_ to the AI cores (A100), instead of being spread over all sixteen cores. So just eight AI cores were used, not the _combination_ of both X100 (for general-purpose computing) and A100 (for AI workloads) - The AI cores are not ideal for compression.
Author
Owner

GCC

Classic Fedora build: rpmbuild -ba ~/rpmbuild/SPECS/gcc.spec

Package K3 P550[1]
gcc 2d, 15h, 53m 5d, 13h, 31m

K3 completed the GCC build 2.9x faster compared to P550 — it completed the build in less than half the time required by the P550.

By comparison, on x86 it takes about 27 hours.

[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2997047

**GCC** Classic Fedora build: `rpmbuild -ba ~/rpmbuild/SPECS/gcc.spec` | Package | K3 | P550[1] | |-|-|-| | gcc | 2d, 15h, 53m | 5d, 13h, 31m | K3 completed the GCC build **2.9x** faster compared to P550 — it completed the build in less than half the time required by the P550. By comparison, **on x86 it takes about 27 hours**. [1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2997047
Author
Owner

OpenSSL

Package K3 P550[1]
openssl 17m36s 3h4m

K3 here sees a ~ 10.x improvement compared to P550! I learnt that this outsized improvement is due to a lot of hand-written vector and assembly code in OpenSSL.

[1] https://riscv-koji.fedoraproject.org/koji/buildinfo?buildID=61806

**OpenSSL** | Package | K3 | P550[1] | |-|-|-| | openssl | 17m36s | 3h4m | K3 here sees a **~ 10.x** improvement compared to P550! I learnt that this outsized improvement is due to a lot of hand-written vector and assembly code in OpenSSL. [1] https://riscv-koji.fedoraproject.org/koji/buildinfo?buildID=61806
kashyapc changed title from Do some Fedora build benchmarks on SpacemiT K3 to Fedora build benchmarks on SpacemiT K3 (RVA23 hardware) 2026-06-11 22:26:11 +00:00
Author
Owner

LLVM

Package K3 P550
llvm 9h21m 20h51

Compiled version on K3: llvm-21.1.8-5.0; for P550, I picked a current build time from the RISC-V Koji.

**LLVM** | Package | K3 | P550 | |-|-|-| | llvm | 9h21m | 20h51 | Compiled version on K3: `llvm-21.1.8-5.0`; for P550, I picked a current build time from the RISC-V Koji.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
riscv/planning#17
No description provided.