Skip to content

ostrich/QEMUUserModeBenchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QEMU User Mode Benchmarking

Ever wondered which QEMU emulator is the fastest? So did I, so I made this benchmark. It runs a Sieve of Eratosthenes on each of Go's supported Linux target architectures using QEMU User Mode Emulation.

Requirements

Usage

git clone https://github.com/ostrich/QEMUUserModeBenchmark.git && cd QEMUUserModeBenchmark
./build.sh
./benchmark.sh
./summary.py
./chart.py

Files

  • main.go: A Sieve of Eratosthenes. Calculates primes up to 10 million.
  • build.sh: Compiles statically linked binaries for each of Go's supported Linux target architectures (386, amd64, arm, arm64, loong64, mips, mips64, mips64le,mipsle, ppc64, ppc64le, riscv64, and s390x).
  • benchmark.sh: Uses hyperfine to benchmark the execution time of each executable. Outputs results to json.
  • summary.py: Parses json and prints results to stdout.
    • --format text: Default. Prints a simple table to stdout.
    • --format csv: Prints a CSV to stdout.
    • --format markdown: Prints a markdown table to stdout.
  • chart.py: Uses matplotlib to generate a simple chart from the json output.

My results

Run on an AMD 5900X with 64 GiB RAM.

Results

Architecture Mean (s) StdDev (s)
amd64 0.315251 0.005368
386 0.428634 0.005116
arm 2.540277 0.032247
arm64 1.838771 0.051209
loong64 1.416593 0.027397
mips 1.708859 0.034966
mips64 1.541374 0.041453
mips64le 1.547204 0.025188
mipsle 1.687246 0.038941
ppc64 1.538111 0.040045
ppc64le 1.489758 0.023992
riscv64 1.700851 0.051411
s390x 1.399324 0.018790

About

Benchmarking QEMU User Mode Emulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published