Date: Mon, 14 Aug 2023 23:35:07 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: "Patrick M. Hausen" <hausen@punkt.de> Cc: Odhiambo Washington <odhiambo@gmail.com>, freebsd-virtualization@freebsd.org Subject: Re: bhyve VM not getting as much upload bandwidth as the host Message-ID: <6bb84230-7bee-497e-4076-88a2603acb40@quip.cz> In-Reply-To: <96160FBF-4E48-48E3-B26C-026CEB5B03C2@punkt.de> References: <CAAdA2WN6FTT=Bn-p3EEGDk_-8=g_PoFicUb%2Be-ybcpKxjY5bwQ@mail.gmail.com> <096b2d73-b28c-bd6b-a6d3-2a3c3dbaea7e@h4ck.io> <CAAdA2WM8Qrro-md-Rg%2BXfj5BxNrP_A8chD6TGrxQD2G14oC86g@mail.gmail.com> <38587cf9-29a7-1246-3b64-a3cf35933717@quip.cz> <96160FBF-4E48-48E3-B26C-026CEB5B03C2@punkt.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14/08/2023 11:38, Patrick M. Hausen wrote: [..] >> I never had this solved. Even my FreeBSD guest on FreeBSD host with VirtualBox is slow as few hunderds kB/s >> It was like 10Mbps with Bhyve. I only use VMs for testing but installing packages is always so slow. So you are not alone. I would really like to know how to improve the network speed with virtualized environment. > > This looks weird to me. I run lots of VMs in production on TrueNAS CORE > - essentially FreeBSD 13-STABLE with bhyve and all of them get near gigabit > speed with bridged networking. > > Guests: > > Windows > Ubuntu > FreeBSD (OPNsense) > > Specifically the OPNsense VM can route 700-800 Mbit/s across gigabit interfaces. > > All my VMs use VirtIO network drivers - do yours? NICs are emulated Intel PRO/1000 MT but I tested VirtIO in the past and it was the same. Now I tried to disable RXCSUM and TXCSUM on host interface and it fixed it. It is strange to me because I never had speed problem on the host it self so I do not suspect anything wrong on host's interface. 1) speedtest in VM with RXCSUM & TXCSUM enabled Hosted by Rohwerder Datasystems GmbH (Schwarzenbek) [463.71 km]: 42.018 ms Testing download speed Download: 7.37 Mbit/s Testing upload speed Upload: 25.16 Mbit/s 2) speedtest in VM right after I disabled RXCSUM & TXCSUM on the host Hosted by Rohwerder Datasystems GmbH (Schwarzenbek) [463.71 km]: 23.841 ms Testing download speed Download: 242.99 Mbit/s Testing upload speed Upload: 24.80 Mbit/s 250 Mbit/s is a full speed of my home internet connection. I don't know why but RXCSUM and TXCSUM cause more problems in my experiences. I remember I must disabled RXCSUM & TXCSUM in completely virtual environment of some cloud provider (based on KVM & Qemu) where we run about 10 machines and one of them should act like an Ipsec gateway fore a couple of private VMs. Packets were not forwarded between 2 NICs until i disabled RX & TX csums on private VirtIO NIC - all VMs were FreeBSD 12.3 at that time. Thank you! Best regards Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6bb84230-7bee-497e-4076-88a2603acb40>