From nobody Mon Aug 14 09:38:22 2023 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RPTqR72v4z4qCkq for ; Mon, 14 Aug 2023 09:38:43 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from mail.punkt.de (mail.punkt.de [IPv6:2a00:b580:8000:11:1c6b:7032:35e9:5616]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RPTqR4k63z4NYD for ; Mon, 14 Aug 2023 09:38:43 +0000 (UTC) (envelope-from hausen@punkt.de) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (us.hausen.com [140.82.8.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.punkt.de (Postfix) with ESMTPSA id 6BA8E38B4A; Mon, 14 Aug 2023 11:38:34 +0200 (CEST) Content-Type: text/plain; charset=utf-8 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: bhyve VM not getting as much upload bandwidth as the host From: "Patrick M. Hausen" In-Reply-To: <38587cf9-29a7-1246-3b64-a3cf35933717@quip.cz> Date: Mon, 14 Aug 2023 11:38:22 +0200 Cc: Odhiambo Washington , freebsd-virtualization@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <96160FBF-4E48-48E3-B26C-026CEB5B03C2@punkt.de> References: <096b2d73-b28c-bd6b-a6d3-2a3c3dbaea7e@h4ck.io> <38587cf9-29a7-1246-3b64-a3cf35933717@quip.cz> To: Miroslav Lachman <000.fbsd@quip.cz> X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RPTqR4k63z4NYD X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16188, ipnet:2a00:b580::/32, country:DE] Hi all, > Am 14.08.2023 um 11:30 schrieb Miroslav Lachman <000.fbsd@quip.cz>: >=20 > On 14/08/2023 10:49, Odhiambo Washington wrote: >> I had the following in sysctl.conf: >> net.link.tap.up_on_open=3D1 >> net.link.bridge.pfil_member=3D0 >> net.link.bridge.pfil_bridge=3D0 >> net.link.bridge.pfil_local_phys=3D1 >> So I only did: >> sysctl -w net.link.bridge.pfil_onlyip=3D0 >> sysctl -w net.link.bridge.pfil_local_phys=3D0 >> Nothing has changed for the linux VM. >> Windows11 VM is getting download/upload speed of 40Mbps/37Mbps while = a Debian12 VM is getting download/upload of 37Mbps/45Kbps. >> Maybe there is an issue with the Linux itself? >=20 > 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? Odhiambo, another minor thing: > ifconfig_em1=3D"inet w.x.y.z netmask 255.255.255.0 mtu 1492 -tso -lro = -txcsum -rxcsum" A bridge member interface must not have a layer 3 address. You must put = the IP address on the bridge interface itself and only configure ifconfig_em1=3D"mtu 1492 -tso -lro -txcsum -rxcsum up" But this is most probably not connected to your performance problem. It = just breaks other things if you have an IP address on a bridge member ;-) Why are you lowering the MTU of em1? Does that carry over to the bridge = interface? What's the MTU of the emulated interface in your Linux VM? Kind regards, Patrick --=20 punkt.de GmbH Patrick M. Hausen .infrastructure Sophienstr. 187 76185 Karlsruhe Tel. +49 721 9109500 https://infrastructure.punkt.de info@punkt.de AG Mannheim 108285 Gesch=C3=A4ftsf=C3=BChrer: Daniel Lienert, Fabian Stein