Skip to content

Instantly share code, notes, and snippets.

@Jobians
Created October 31, 2025 10:33
Show Gist options
  • Select an option

  • Save Jobians/46a94af7cb8769ba427a984c1c0ef398 to your computer and use it in GitHub Desktop.

Select an option

Save Jobians/46a94af7cb8769ba427a984c1c0ef398 to your computer and use it in GitHub Desktop.
QEMU ARM64 vs x86_64 performance benchmarks on Termux (Android ARM64)

๐Ÿงฉ QEMU Performance Comparison Summary

Host: Termux on Android (ARM64 / aarch64)
Device: Android phone running Termux
Virtualization: QEMU emulation (no KVM acceleration)

๐Ÿ–ฅ๏ธ Virtual Machines Compared

VM QEMU Command Architecture Notes
๐ŸŸข ARM64 Guest qemu-system-aarch64 ARM64 on ARM64 Native architecture, efficient
๐Ÿ”ด x86_64 Guest qemu-system-x86_64 x86 emulated on ARM Heavy software emulation via TCG

โš™๏ธ Test 1: Disk Write Speed (dd)

Metric ARM64 Guest x86_64 Guest Winner
Command dd if=/dev/zero of=testfile bs=1M count=512 conv=fdatasync Same โ€”
Result 46.0 MB/s 14.4 MB/s ๐ŸŸข ARM64 3.2ร— faster

๐Ÿ“˜ Meaning: Disk I/O on the ARM VM is over 3ร— faster due to less emulation and better VirtIO efficiency.


๐Ÿง  Test 2: CPU Speed (sysbench cpu --cpu-max-prime=20000)

Metric ARM64 Guest x86_64 Guest Winner
Events per second 187.9 117.0 ๐ŸŸข ARM64 1.6ร— faster
Total time 10.0 s 10.0 s โ€”
Avg latency 5.24 ms 8.43 ms ๐ŸŸข ARM64

๐Ÿ“˜ Meaning: ARM guest performs CPU operations ~60% faster; x86 guest suffers heavy emulation overhead.


๐Ÿงฎ Test 3: Memory Speed (sysbench memory run)

Metric ARM64 Guest x86_64 Guest Winner
Total operations 3,167,306 667,127 ๐ŸŸข ARM64
Transfer rate 306.7 MiB/s 64.6 MiB/s ๐ŸŸข ARM64 4.7ร— faster

๐Ÿ“˜ Meaning: ARM64 guest accesses memory much faster โ€” emulating x86 memory operations slows the x86 VM drastically.


๐ŸŒ Test 4: Network Speed (speedtest-cli)

Metric ARM64 Guest x86_64 Guest Winner
Download 2.76 Mbit/s 2.19 Mbit/s ๐ŸŸข ARM64
Upload 7.90 Mbit/s 4.42 Mbit/s ๐ŸŸข ARM64
Ping 255 ms 329 ms ๐ŸŸข ARM64

๐Ÿ“˜ Meaning: The ARM guest handles network packets faster and with lower latency; x86 emulation slows network I/O.


๐Ÿงฉ Overall Comparison

Category ARM64 Guest x86_64 Guest Relative Speed
๐Ÿง  CPU 187.9 events/s 117.0 events/s +61%
๐Ÿ’พ Disk Write 46.0 MB/s 14.4 MB/s +220%
๐Ÿงฎ Memory 306.7 MiB/s 64.6 MiB/s +375%
๐ŸŒ Network Upload 7.9 Mbit/s 4.4 Mbit/s +80%
๐ŸŒ Network Download 2.76 Mbit/s 2.19 Mbit/s +26%
โฑ๏ธ Ping (lower better) 255 ms 329 ms โˆ’22% latency

๐Ÿ Final Verdict

Category Winner Why
CPU Performance ๐ŸŸข ARM64 Native instruction execution
Memory Performance ๐ŸŸข ARM64 No architecture translation
Disk I/O ๐ŸŸข ARM64 Faster VirtIO + less emulation
Network ๐ŸŸข ARM64 Lower latency + better throughput
Overall Efficiency ๐ŸŸข ARM64 (โ‰ˆ3ร— faster overall) Runs natively on your phoneโ€™s ARM CPU

โœ… Conclusion

The ARM64 guest (qemu-system-aarch64) running inside Termux on Android (ARM64) is clearly superior in every category โ€” CPU, memory, disk, and network.

Running x86_64 VMs on Termux is possible, but much slower due to full software emulation (TCG).

For best results on mobile ARM devices, use ARM64-based images when virtualizing with QEMU in Termux.


๐Ÿงฐ Example Setup Reference

ARM64 VM Command:

qemu-system-aarch64 \
  -machine virt,accel=tcg \
  -cpu cortex-a53 \
  -m 2048 \
  -smp 2 \
  -drive file=debian-arm64.img,format=qcow2,if=virtio \
  -bios $PREFIX/share/qemu/edk2-aarch64-code.fd \
  -nographic \
  -serial mon:stdio \
  -device virtio-net-device,netdev=net0 \
  -netdev user,id=net0 \
  -boot c

x86_64 VM Command:

qemu-system-x86_64 \
  -machine q35 \
  -m 1024 \
  -smp 2 \
  -cpu max \
  -drive format=qcow2,file=debian-x86_64.img \
  -netdev user,id=n1,hostfwd=tcp::3030-:3030 \
  -device virtio-net,netdev=n1 \
  -nographic \
  -serial mon:stdio

Created and tested using QEMU inside Termux on an ARM64 Android device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment