Hi Paul,

Thanks for the response. I've collected more precise data for 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.

> 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?

Thanks again,
//anders

On Tue, Apr 5, 2022, at 11:44 PM, Paul Menzel wrote:
> Dear Anders,
> 
> 
> Am 05.04.22 um 22:31 schrieb Anders Pitman:
> > I'm trying to improve user networking performance, especially from a
> > Windows 10 host, Linux guest. My goal is to get at least 100Mbps
> > duplex. I'm hoping to be able to saturate a 1Gbps link. I need to
> > avoid requiring any admin privileges, which is why I'm doing user
> > networking instead of setting up a TAP device.
> 
> Please share the command line, how you start the GNU/Linux VM, and what 
> GNU/Linux distribution you use.
> 
> > Currently I'm seeing about 20-50Mbps on an older Windows 10 laptop.
> 
> Please be specific. What kind of laptop (CPU, …)?
> 
> How do you measure the transfer speed?
> 
> > Enabling -accel whpx improves that significantly, but still not
> > 1Gbps, and requires Windows Pro and extra steps for the user to
> > enable virtualization.
> > 
> > I have a few specific questions:
> > 
> > * Is 1Gbps realistic with my desired setup?
> > * Does virtio work with the slirp user networking? I can enable it,
> > but I'm not sure it's making much difference.
> > * Is there potential to improve upon slirp with a different user
> > networking implementation? It seems like if you set up an ivshmem
> > interface (similar to how Looking Glass works) you could get really
> > efficient packet transfers. I was under the impression this is how
> > slirp+virtio would work, but again I'm not seeing the hoped-for
> > performance.
> > 
> > If such a thing is possible but doesn't exist, I would be interested
> > in working on it myself. I would appreciate any pointers on any
> > additional resources to get started with this.
> 
> I’d say it should be possible with not-too old hardware, but I never 
> tried it myself.
> 
> 
> Kind regards,
> 
> Paul
> 

Reply via email to