lima-vm / lima

Linux virtual machines, with a focus on running containers
https://lima-vm.io/
Apache License 2.0
14.59k stars 572 forks source link

vm-to-vm network performance #2348

Open gkyildirim opened 1 month ago

gkyildirim commented 1 month ago

Description

For VZ type vms I see vm-to-vm ~25 Gbps with bridged networked in both UTM and Virtuallbuddy for reference. This is tested via iperf3. For lima it is ~1 Gbps for bridged and~3.4 Gbps for user-v2. Is this expected?

Also while testing bridge vm-to-host iperf stalls after a short period and then access to bridged network subnet is stopped until vms is stopped and started. And while stopping with limactl stop vm following error occurs:

ERRO[0002] [hostagent] Failed to read header read unix ->/private/var/run/lima/socket_vmnet.bridged: use of closed network connection
ERRO[0002] [hostagent] Failed to read packet EOF

This is Macbook Pro M1 with macOS 14.4.1 (23E224) and limactl version 0.22.0 Trying to keep it short but I can share more info if required.

balajiv113 commented 1 month ago

@AkihiroSuda Are we seeing performance impact specifically in socket-vmnet (or) generally vmnet.framework itself has this bottleneck ??? We can try with softnet written in rust (vmnet wrapper for NAT) and see how it performs.