qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improving user networking performance


From: Paul Menzel
Subject: Re: Improving user networking performance
Date: Fri, 8 Apr 2022 09:07:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

Dear Anders,


Am 07.04.22 um 22:27 schrieb Anders Pitman:

Thanks for the response. I've collected more precise data for you.

Thank you.

Please share the command line, how you start the GNU/Linux VM, and
what GNU/Linux distribution you use.

I'll share the specific command lines with the results data below.
For the distro, I'm using buildroot-2022.02. I started with the
configs/qemu_x86_64_defconfig file. Kernel 5.15.18. It's also set up
to bundle the cpio initramfs inside the kernel image, includes
iperf3, and e1000 drivers.

Please be specific. What kind of laptop (CPU, …)?

It's an old Lenovo x220 laptop. Intel Core i5-2520M. 2 hyperthreaded
cores. 2.5GHz. 8GB memory.

Nice. If you are interested in FLOSS firmware, see coreboot [1]. ;-)

How do you measure the transfer speed?

I'm using iperf3. It's running on the Windows 10 host using MSYS2, like so:

iperf3 -s

And from the guest like so:

iperf3 -c 10.0.2.2

Results:

As a baseline, I ran iperf3 over localhost on the host machine. Both
client and server were running
from MSYS2 with iperf3 installed using pacman -S iperf3. Results:

1.37Gbits/sec

For the remaining tests, I ran iperf from the guest to host like so:

iperf3 -c 10.0.2.2

qemu-system-x86_64.txt -kernel bzImage -append "console=ttyS0" -nic user,e1000

45.1Mbits/sec

qemu-system-x86_64.txt -kernel bzImage -append "console=ttyS0" -nic user,virtio

33.9Mbits/sec

qemu-system-x86_64.txt -kernel bzImage -append "console=ttyS0" -nic user,e1000 
-accel whpx

63.5Mbits/sec

qemu-system-x86_64.txt -kernel bzImage -append "console=ttyS0" -nic user,virtio 
-accel whpx

83.4Mbits/sec

qemu-system-x86_64.txt -kernel bzImage -append "console=ttyS0" -nic user,virtio 
-accel whpx -m 4096 -smp 4

63.9Mbits/sec

Notes:

* virtio+whpx is the fastest, but virtio without whpx is slower than e1000.
* None of the tests are saturating the host CPU. In fact CPU usage according to 
Task Manager stays below ~20%.
* I get fairly different results from run to run for the same test. As much as 
+/- 10Mbits/sec observed so far.
* Apparently -cpu host doesn't work on Windows hosts?

Thank you for the detailed data. Unfortunately, I have no idea about running QEMU under Microsoft Windows, but could imagine, that it’s not very optimized. Also, I wonder if using VirtIO is possible with Microsoft Windows host. Does it implement that interface?

To rule out it’s Microsoft Windows related, you could see if it works better with a GNU/Linux host, for example a live distribution. And you could also try to run QEMU in WSL (Windows Subsystem for Linux) and see if that works better.


Kind regards,

Paul


[1]: https://doc.coreboot.org/mainboard/lenovo/Sandy_Bridge_series.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]