Kvm on aarch64 performance expectation?

I’ve been running in Docker on RK3399 for some time and performance has been great.

Recently I got one of these: NanoPi R6S Quad A76 + quad A55, 8GB RAM, 32GB eMMC. I have added a Micron 64GB class A2 uSD for storage. I am running their stock Ubuntu Desktop 22.04 from eMMC.

Wanting to probe deeper into the system, I have installed kvm and brought up haos_generic-aarch64-9.5.qcow2 using recommended settings (2 CPU / 2GB) on the SD card. The init screen (“20 minutes” etc.) took around 90 minutes. Boot time is similar. virt-manager reports 100% CPU usage continuously. The SD card has write performance around 90MBps until the write buffer saturates, then drops to around 20MBps. It’s the fastest SD card I’ve ever seen, comfortably.

What performance should I expect? This feels unusually slow for an aarch64 native image running on aarch64, but maybe my expectation is wrong.

As a follow-up to this, the supplied kernel does not support kvm, so it’s running in full SW emulation (the fact this runs at all usably impresses me). While I have built a kernel with kvm support enabled, I have not yet had time to test it.

Minor addendum to previous post: it was RK3328, not RK3399 (NEO3). Docker was running admirably despite 1GB RAM, admittedly doing little else and only running ~ 10x Hue bulbs.

Final update. Follow instructions here to update kernel: GitHub - friendlyarm/sd-fuse_rk3588. In menuconfig, select Virtualisation on the front page, enter the menu and select kvm (the only option on the page). Rebuild an SD image and program. Expect some messing around with apt --fix-missing after first boot, but it will all resolve itself fairly cleanly (so cleanly I didn’t bother finding a root cause).

The instance was configured with 4 CPUs / 4096MB RAM. Boot time to mount file system is reduced from 37 seconds to 2.6 seconds. Integrations complaining about startup time no longer complain. VSCode server runs merrily at fast-as-local-desktop speed. The half-second-to-second delay observed when pressing buttons in the HA UI is mostly gone. CPU usage is minimal.

I’m making a note here; huge success.