Benchmarking RISC-V SpaceMIT X60 and others

I recently received 4 Milk-V Jupiter development boards, and one Banana Pi F3 through RISC-V International. All of these boards have the same (or very similar) SpaceMIT X60 SoC which is a fairly capable 8 core RISC-V processor.

model name      : Spacemit(R) X60
isa             : rv64imafdcv_zicbom_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zfhmin_zca_zcd_zba_zbb_zbc_zbs_zkt_zve32f_zve32x_zve64d_zve64f_zve64x_zvfh_zvfhmin_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt

Since we’ll be using all of these boards for Fedora package building I ran some simple benchmarks of how well they perform. The benchmark is to recompile this grub2 package to RPMs:

# dnf builddep grub2-2.12-11.0.riscv64.fc41.src.rpm
$ time rpmbuild --recompile grub2-2.12-11.0.riscv64.fc41.src.rpm

(I did a few builds in a row until the times settled down, so these are all “hot cache” builds on an otherwise unloaded board.)

Milk-V JupiterRISC-V SpaceMIT X60
8 cores
16GB RAM
748s
Banana PiRISC-V SpaceMIT X60
8 cores
16GB RAM
962s
VisionFive 2JH7110
4 cores
8GB RAM
923s
Raspberry Pi 4ARM Cortex A72
4 cores
8 GB RAM
753s
AMD gaming PCAMD Ryzen 9 7950X
16 cores
64 GB RAM
104s
HiFive Premier P550 with SSD
(update 2024/12/10)
RISC-V ESWIN EIC7700X P550
4 cores
16 GB RAM
SATA SSD
598s
HiFive Premier P550 with NVMe
(update 2024/12/12)
RISC-V ESWIN EIC7700X P550
4 cores
16 GB RAM
NVMe in adapter in PCIe slot
464s
HiFive Premier P550 virtualized
NVMe, KVM guest
(update 2024/12/15)
Host: RISC-V ESWIN EIC7700X P550 as in row above
Guest: KVM guest
678s

We should be getting a SiFive P550 development board soon which is the first widely available out-of-order RISC-V core.

(Thanks Andrea Bolognani for benchmarking the VF2 and P550 with NVMe and KVM guest)

8 Comments

Filed under Uncategorized

Virt-v2v take-out hiring

Red Hat is hiring two software engineering positions, to work on virt-v2v and the wider MTV project. Virt-v2v is the software we use for “VMware take-out”, ie. converting existing virtual machines from VMware to run on KVM (Openshift, Openstack, or just plain qemu). This is a huge opportunity right now owing to Broadcom deciding to set fire to piles of money.

As is usual with these things there was a lot of miscommunication between what we asked for an what the job description says, but for the virt-v2v position we’re looking especially for C programmers with a good understanding of virtualization, who are motivated self-starters. The roles nominally are on-site in Brno, Czech Republic, and the US (Ireland is mentioned weirdly, but I think that’s a tax thing). This isn’t a real requirement and remote work is fine, although for junior developers we’d probably ask you to attend the office for the first month or so.

Workday links (sorry, not my choice): Senior Software Engineer role, Principal Software Engineer role. If you’re interested in applying please follow the instructions there rather than commenting here.

Leave a comment

Filed under Uncategorized

Exploit qemu to display nyancat

I discovered this exploit in qemu’s network block driver:

To reproduce it you’ll need nbdkit >= 1.40.1:

$ wget http://oirase.annexia.org/nyan.c
$ nbdkit --log=null cc nyan.c
$ qemu-img info nbd://localhost

What’s happening here (discussion upstream) is just that qemu prints the error message from the server without sanitisation, so we can send terminal codes and more. This affects any user-controlled qcow2 file, since you can set NBD as a backing source.

Leave a comment

Filed under Uncategorized

Virt-v2v | Devconf.cz lightning talk

I did a talk about the Broadcom acquisition of VMware and using virt-v2v to liberate your VMs. Check it out below. It’s only 5 minutes long!

(Note this is a link to the livestream, it should start at 7h 4m 9s)

1 Comment

Filed under Uncategorized

Fedora on RISC-V | Devconf.cz talk

David Abdurachmanov and myself did a talk about Fedora on RISC-V. Check it out below.

(Note this is a link to the live stream, and it should start playing at 4h 45m 14s)

Leave a comment

Filed under Uncategorized

I was interviewed on NPR Planet Money

I was interviewed on NPR Planet Money about my small role in the Jia Tan / xz / ssh backdoor.

NPR journalist Jeff Guo interviewed me for a whole 2 hours, and I was on the program (very edited) for about 4 minutes! Quite an interesting experience though.

2 Comments

Filed under Uncategorized

Red Hat Research article on RISC-V extensions

Finally been published …

https://research.redhat.com/blog/article/risc-v-extensions-whats-available-and-how-to-find-it/

Leave a comment

Filed under Uncategorized

nbdkit binaries for Windows

Much requested, I’m now building nbdkit binaries for Windows. You can get them from the Fedora Koji build system by following this link. Choose the latest build by me (not one of the automatic builds), then under the noarch heading look for a package called mingw64-nbdkit-version. Download this and use your favourite tool that can unpack RPM files.

Some notes: This contains a 64 bit Windows binary of nbdkit and a selection of plugins and filters. There is a mingw32-nbdkit package too if you really want a 32 bit binary but I wouldn’t recommend it. For more information about running nbdkit on Windows, see the instructions here. Source is available for the binaries from either Koji or the upstream git repository. The binary is cross-compiled and not tested, so if it is broken please let us know on the mailing list.

Leave a comment

Filed under Uncategorized

Heads up! Lichee Pi 4A vs VisionFive 2 vs HiFive Unmatched vs Raspberry Pi 4B

I have a lot of RISC-V and Arm hardware. How do my latest 3 RISC-V purchases stand up against each other and the stalwart Raspberry Pi 4B? Let’s find out!

The similarities between these boards are striking. All have 4 cores and all except the HiFive board have 8GB of RAM (HiFive Unmatched has 16GB). All have some kind of flash-based storage: The Raspberry Pi and Sipeed Lichee are using external SanDisk SSDs connected by USB 3. The HiFive Unmatched and VisionFive 2 have NVMe drives (I hope all SBCs provide an NVMe slot going forward).

Since I mainly use these for compiling Fedora packages, I tested compiling qemu using identical configurations. I built it a few times to warm up and then timed the last build, on otherwise unloaded machines. Here are the results:

Release dateCost (see note)qemu build (secs)
HiFive Unmatched (RISC-V)2020£1000+3642
Vision Five 2 (RISC-V)2022/3£150582
Sipeed Lichee Pi 4A (RISC-V)2023£2001376*
Raspberry Pi 4B (Arm)2019£2381154

Note that in the cost column I have included tax, delivery, and all extras that I had to purchase (such as disks) to bring the device up to the tested configuration. This is why the prices are much higher than the sticker price you will see online. Also the Raspberry Pi price is what I paid back in the halcyon days of 2020 before Raspberry Pi shortages.

* The speed test for the Sipeed Lichee was done using the Fedora distribution. There seems to be something very wrong with the measured speed of this board, and given the TH1520 chip we think this board ought to be able to do much better. However restoring the original Debian distro to it will require a load more work, because the boot path for this board is insane.

If you would like to try to reproduce these numbers, first download this config file (benchconfig.sh). Then check out qemu sources @ commit 885fc169f09f591 (don’t forget the submodules). Then do:

mkdir build
cd build
../benchconfig.sh
make clean
time make -j4

This should compile about 2576 targets (the number can vary depending on the precise stuff you have installed, it’s hard to make qemu configurations completely identical, but it shouldn’t be much larger or smaller than this).

12 Comments

Filed under Uncategorized

LicheePi 4A cpuinfo etc

# cat /proc/cpuinfo
processor	: 0
hart		: 0
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

processor	: 1
hart		: 1
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

processor	: 2
hart		: 2
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

processor	: 3
hart		: 3
isa		: rv64imafdcvsu
mmu		: sv39
cpu-freq	: 1.848Ghz
cpu-icache	: 64KB
cpu-dcache	: 64KB
cpu-l2cache	: 1MB
cpu-tlb		: 1024 4-ways
cpu-cacheline	: 64Bytes
cpu-vector	: 0.7.1

# free -m
               total        used        free      shared  buff/cache   available
Mem:            7803         432        6816          11         645        7371
Swap:              0           0           0

# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk0      179:0    0  7.3G  0 disk 
|-mmcblk0p1  179:1    0    2M  0 part 
|-mmcblk0p2  179:2    0  500M  0 part /boot
`-mmcblk0p3  179:3    0  6.8G  0 part /
mmcblk0boot0 179:8    0    4M  1 disk 
mmcblk0boot1 179:16   0    4M  1 disk 

Leave a comment

Filed under Uncategorized