From nobody Sun Sep 29 07:12:23 2024 X-Original-To: freebsd-net@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 4XGb4Y6Zc7z5XG1w for ; Sun, 29 Sep 2024 07:12:29 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [IPv6:2001:8b0:aab5:107::11]) by mx1.freebsd.org (Postfix) with ESMTP id 4XGb4Y0BQlz4tXq for ; Sun, 29 Sep 2024 07:12:28 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=le-fay.org header.s=fuchsia header.b=CJCdptFm; spf=pass (mx1.freebsd.org: domain of lexi@le-fay.org designates 2001:8b0:aab5:107::11 as permitted sender) smtp.mailfrom=lexi@le-fay.org; dmarc=none Received: from iris.eden.le-Fay.ORG (iris.eden.le-fay.org [IPv6:fd12:8247:3:1::7]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id 648C220DF9 for ; Sun, 29 Sep 2024 07:12:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1727593944; bh=mfldhpVbIIIkG2x/pD39XEsoIcUnwKoR7spZgbM87Jg=; h=Date:Subject:To:References:From:In-Reply-To; b=CJCdptFmQU9WTb493cOOUv5YzsV7WQnxap1LZ29pyuCVXL73mJHh9X2pFsPSvWcSI pfvnlGd/PQ1BB401s67ZuTLYiXRf0pFmrL3+H+MyEO/5jUKVfudapudVFxj1DhHTnq EDgD4FazPMSfiVYJtgTRmpWg8M520mRsxwI1jJ9E= Received: from [IPV6:2001:8b0:aab5:c110:ab:f106:1d40:4841] (unknown [IPv6:2001:8b0:aab5:c110:ab:f106:1d40:4841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id B89F52C0400 for ; Sun, 29 Sep 2024 08:12:23 +0100 (BST) Message-ID: Date: Sun, 29 Sep 2024 08:12:23 +0100 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: slow network performance in bhyve with freebsd guests compared with any other guest os Content-Language: en-GB To: freebsd-net@freebsd.org References: From: Lexi Winter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.39 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[le-fay.org:s=fuchsia]; R_SPF_ALLOW(-0.20)[+ip6:2001:8b0:aab5:107::11]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20712, ipnet:2001:8b0::/32, country:GB]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DMARC_NA(0.00)[le-fay.org]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; DKIM_TRACE(0.00)[le-fay.org:+] X-Rspamd-Queue-Id: 4XGb4Y0BQlz4tXq X-Spamd-Bar: --- On 29/09/2024 07:58, void wrote: > Surprisingly, freebsd guest performance is about 1/3rd of the line speed. > Do some sysctls need to be tuned in freebsd specifically for when it is > in a guest context? i tested this here and cannot reproduce the problem: 1023!ragweed ~% iperf3-darwin -c iris.eden.le-fay.org Connecting to host iris.eden.le-fay.org, port 5201 [ 18] local 2001:8b0:aab5:c110:ab:f106:1d40:4841 port 57426 connected to fd12:8247:3:1::7 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd RTT [ 18] 0.00-1.00 sec 953 MBytes 7.99 Gbits/sec 0 4.00 MBytes 1ms [ 18] 1.00-2.00 sec 1.15 GBytes 9.87 Gbits/sec 0 4.00 MBytes 1ms [ 18] 2.00-3.00 sec 1.15 GBytes 9.87 Gbits/sec 0 4.00 MBytes 2ms [ 18] 3.00-4.00 sec 1.15 GBytes 9.87 Gbits/sec 0 4.00 MBytes 2ms [ 18] 4.00-5.00 sec 1.13 GBytes 9.67 Gbits/sec 0 4.00 MBytes 1ms [ 18] 5.00-6.00 sec 1.15 GBytes 9.87 Gbits/sec 0 4.00 MBytes 2ms [ 18] 6.00-7.00 sec 1.14 GBytes 9.82 Gbits/sec 0 4.00 MBytes 1ms [ 18] 7.00-8.00 sec 1.15 GBytes 9.87 Gbits/sec 0 4.00 MBytes 1ms [ 18] 8.00-9.00 sec 1.15 GBytes 9.85 Gbits/sec 46 3.35 MBytes 1ms [ 18] 9.00-10.00 sec 1.15 GBytes 9.87 Gbits/sec 0 3.44 MBytes 1ms - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 18] 0.00-10.00 sec 11.2 GBytes 9.66 Gbits/sec 46 sender [ 18] 0.00-10.00 sec 11.2 GBytes 9.65 Gbits/sec receiver iperf Done. 1023!ragweed ~% client is macOS, server is FreeBSD 15.0 bhyve guest, VM host is FreeBSD 15.0 on Ryzen 7 2700X with ix(4) network card, path MTU is 9000. as you can see, it reached close enough to wire speed. i tested with 1500 MTU and it managed ~4Gbps, which is not great, but around what i'd expect (and a lot faster than your test manages). i am not using tcp_rack or any other TCP stack non-default options. regards, liss.