carlosperate / docker-qemu-rpi-os

Docker images with Raspberry Pi OS running on QEMU
MIT License
27 stars 5 forks source link

Low performance with Qemu's `pi2` and `pi3` machines #3

Open carlosperate opened 6 months ago

carlosperate commented 6 months ago

Compared with versatilepb + dhruvvyas90/qemu-rpi-kernel.

The total values are not important in this case, as these are for comparison against each other. All done on the same machine with the same internet connection, docker on x86 mac (so the container itself is running inside a linux vm):

RAM speedtest download speedtest upload cpu test single thread cpu test 4 threads disk write
bare docker container 8 GB 189.43 Mbit/s 77.49 Mbit/s 10 s 10 s 0.5 s
qemu versatilepb 256 MB 3.33 Mbit/s 6.84 Mbit/s 13 s 12 s 18 s
qemu pi2 1 GB 0.67 Mbit/s 0.62 Mbit/s 15 s 6 s 539 s
qemu pi3 1 GB 0.55 Mbit/s 0.72 Mbit/s 26 s 10 s 520 s

Speedtest: speedtest-cli --secure cpu single thread: sysbench --num-threads=1 --validate=on --test=cpu --cpu-max-prime=1000 run cpu 4 threads: sysbench --num-threads=4 --validate=on --test=cpu --cpu-max-prime=1000 run disk write: dd if=/dev/zero of=~/test.tmp bs=1M count=256 conv=fsync https://github.com/carlosperate/docker-qemu-rpi-os/blob/37ac36b820cf98f1da1acf61d1ffc27fcf1de978/benchmark-vm.py#L96-L118

carlosperate commented 6 months ago

Been looking into this and there are a few things to take in consideration.

Added in commit: 49c922b8b9e30984767105cd8b9be960732ae095

RAM speedtest download speedtest upload cpu test single thread cpu test 4 threads disk write
qemu versatilepb 256 MB 3.33 Mbit/s 6.84 Mbit/s 13 s 12 s 18 s
qemu virt 1 GB 10.31 Mbit/s 10.75 Mbit/s 10 s 4 s 14 s