Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2025 14:27:33 -0400
From:      Cheng Cui <cc@freebsd.org>
To:        void <void@f-m.fm>
Cc:        freebsd-net@freebsd.org
Subject:   Re: vtnet is still slow
Message-ID:  <51300B68-3D16-434E-8A65-696EC48FA98C@freebsd.org>
In-Reply-To: <aPjkGDgl6MCF-unb@int21h>
References:  <aPjkGDgl6MCF-unb@int21h>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Interesting, my Bhyve host node "n1" and my MacbookProM1 laptop are wired to the same 1Gbps home switch.

The "n1" runs FreeBSD stable/14-9e40b536cb58 and Bhyve, with ethernet port re0. The "n1fbsd15x" VM runing FreeBSD stable/15-01a653205313 is a guest in "n1" with vtnet0 port. All sysctl values in default.

The iperf3 "iperf3 -c laptop -i1 -t10" traffic sent from the "n1fbsd15x" VM to my laptop:
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.08   sec  89.5 MBytes   695 Mbits/sec   37    501 KBytes       
[  5]   1.08-2.08   sec   112 MBytes   946 Mbits/sec    0    759 KBytes       
[  5]   2.08-3.08   sec   113 MBytes   946 Mbits/sec    0    949 KBytes       
[  5]   3.08-4.07   sec   111 MBytes   943 Mbits/sec    6   5.66 KBytes       
[  5]   4.07-5.07   sec   112 MBytes   941 Mbits/sec    0    705 KBytes       
[  5]   5.07-6.01   sec   106 MBytes   941 Mbits/sec    0    817 KBytes       
[  5]   6.01-7.07   sec   119 MBytes   942 Mbits/sec    0    915 KBytes       
[  5]   7.07-8.07   sec   112 MBytes   942 Mbits/sec    0    984 KBytes       
[  5]   8.07-9.07   sec   112 MBytes   942 Mbits/sec    0   1.01 MBytes       
[  5]   9.07-10.07  sec   113 MBytes   941 Mbits/sec    0   1.04 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.07  sec  1.07 GBytes   916 Mbits/sec   43            sender
[  5]   0.00-10.08  sec  1.07 GBytes   914 Mbits/sec                  receiver

iperf Done.

My Bhyve setup: https://wiki.freebsd.org/chengcui/install_FreeBSD13_VM_via_bhyve

> On Oct 22, 2025, at 10:03, void <void@f-m.fm> wrote:
> 
> Hi,
> 
> I wondered if any work was happening to address the long-standing issue
> of slow vtnet? (in my case, this leads to slow freebsd guest performance
> in bhyve compared with every linux guest tested and OpenBSD).
> 
> I thought maybe the recent bridge work may have ameliorated the problem some, but testing, after configuring a (recent) stable/15 server to use the ip-configured-on-bridge-method, showed no improvement using
> a (recent) stable/14 guest
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-60.03  sec  3.17 GBytes   454 Mbits/sec    0     sender
> [  5]   0.00-60.03  sec  3.17 GBytes   454 Mbits/sec          receiver
> 
> for comparison, an ubuntu 25.04 guest:
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-60.00  sec  6.42 GBytes   919 Mbits/sec  5427    sender
> [  5]   0.00-60.00  sec  6.42 GBytes   919 Mbits/sec          receiver
> 
> the baremetal host
> 
> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-60.01  sec  6.58 GBytes   941 Mbits/sec    0     sender
> [  5]   0.00-60.01  sec  6.58 GBytes   941 Mbits/sec          receiver
> 
> Tests done a year and a half ago on similar hardware showing
> the same patterns http://void.f-m.fm.user.fm/bhyve-virtio-testing.html
> -- 
> 

Best Regards,
Cheng Cui




[-- Attachment #2 --]
<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Interesting, my Bhyve host node "n1" and my MacbookProM1 laptop are wired to the same 1Gbps home switch.<div><br></div><div>The "n1" runs FreeBSD&nbsp;<span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">stable/14-9e40b536cb58 and Bhyve, with ethernet port&nbsp;</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">re0</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">. The "</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">n1fbsd15x" VM runing FreeBSD&nbsp;</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">stable/15-01a653205313&nbsp;</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">is a guest in "n1" with&nbsp;</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">vtnet0 port. All sysctl values in default.</span></div><div><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><br></span></div><div><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">The iperf3 "</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">iperf3 -c laptop -i1 -t10</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">" traffic sent from the&nbsp;</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">"</span><span style="color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);">n1fbsd15x" VM to my laptop:</span></div><div><p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[ ID] Interval &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Transfer &nbsp; &nbsp; Bitrate &nbsp; &nbsp; &nbsp; &nbsp; Retr&nbsp; Cwnd</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 0.00-1.08 &nbsp; sec&nbsp; 89.5 MBytes &nbsp; 695 Mbits/sec &nbsp; 37&nbsp; &nbsp; 501 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 1.08-2.08 &nbsp; sec &nbsp; 112 MBytes &nbsp; 946 Mbits/sec&nbsp; &nbsp; 0&nbsp; &nbsp; 759 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 2.08-3.08 &nbsp; sec &nbsp; 113 MBytes &nbsp; 946 Mbits/sec&nbsp; &nbsp; 0&nbsp; &nbsp; 949 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 3.08-4.07 &nbsp; sec &nbsp; 111 MBytes &nbsp; 943 Mbits/sec&nbsp; &nbsp; 6 &nbsp; 5.66 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 4.07-5.07 &nbsp; sec &nbsp; 112 MBytes &nbsp; 941 Mbits/sec&nbsp; &nbsp; 0&nbsp; &nbsp; 705 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 5.07-6.01 &nbsp; sec &nbsp; 106 MBytes &nbsp; 941 Mbits/sec&nbsp; &nbsp; 0&nbsp; &nbsp; 817 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 6.01-7.07 &nbsp; sec &nbsp; 119 MBytes &nbsp; 942 Mbits/sec&nbsp; &nbsp; 0&nbsp; &nbsp; 915 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 7.07-8.07 &nbsp; sec &nbsp; 112 MBytes &nbsp; 942 Mbits/sec&nbsp; &nbsp; 0&nbsp; &nbsp; 984 KBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 8.07-9.07 &nbsp; sec &nbsp; 112 MBytes &nbsp; 942 Mbits/sec&nbsp; &nbsp; 0 &nbsp; 1.01 MBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 9.07-10.07&nbsp; sec &nbsp; 113 MBytes &nbsp; 941 Mbits/sec&nbsp; &nbsp; 0 &nbsp; 1.04 MBytes&nbsp; &nbsp; &nbsp; &nbsp;</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">- - - - - - - - - - - - - - - - - - - - - - - - -</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[ ID] Interval &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Transfer &nbsp; &nbsp; Bitrate &nbsp; &nbsp; &nbsp; &nbsp; Retr</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 0.00-10.07&nbsp; sec&nbsp; 1.07 GBytes &nbsp; 916 Mbits/sec &nbsp; 43&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sender</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">[&nbsp; 5] &nbsp; 0.00-10.08&nbsp; sec&nbsp; 1.07 GBytes &nbsp; 914 Mbits/sec&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; receiver</span></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255); min-height: 17px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-width: normal; line-height: normal; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(16, 16, 16); background-color: rgb(255, 255, 255);"><span style="font-variant-ligatures: no-common-ligatures">iperf Done.</span></p></div><div><div><br></div><div>My Bhyve setup:&nbsp;https://wiki.freebsd.org/chengcui/install_FreeBSD13_VM_via_bhyve</div><div><br><blockquote type="cite"><div>On Oct 22, 2025, at 10:03, void &lt;void@f-m.fm&gt; wrote:</div><br class="Apple-interchange-newline"><div><div>Hi,<br><br>I wondered if any work was happening to address the long-standing issue<br>of slow vtnet? (in my case, this leads to slow freebsd guest performance<br>in bhyve compared with every linux guest tested and OpenBSD).<br><br>I thought maybe the recent bridge work may have ameliorated the problem some, but testing, after configuring a (recent) stable/15 server to use the ip-configured-on-bridge-method, showed no improvement using<br>a (recent) stable/14 guest<br><br>[ ID] Interval &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transfer &nbsp;&nbsp;&nbsp;&nbsp;Bitrate &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retr<br>[ &nbsp;5] &nbsp;&nbsp;0.00-60.03 &nbsp;sec &nbsp;3.17 GBytes &nbsp;&nbsp;454 Mbits/sec &nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;sender<br>[ &nbsp;5] &nbsp;&nbsp;0.00-60.03 &nbsp;sec &nbsp;3.17 GBytes &nbsp;&nbsp;454 Mbits/sec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiver<br><br>for comparison, an ubuntu 25.04 guest:<br><br>[ ID] Interval &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transfer &nbsp;&nbsp;&nbsp;&nbsp;Bitrate &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retr<br>[ &nbsp;5] &nbsp;&nbsp;0.00-60.00 &nbsp;sec &nbsp;6.42 GBytes &nbsp;&nbsp;919 Mbits/sec &nbsp;5427 &nbsp;&nbsp;&nbsp;sender<br>[ &nbsp;5] &nbsp;&nbsp;0.00-60.00 &nbsp;sec &nbsp;6.42 GBytes &nbsp;&nbsp;919 Mbits/sec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiver<br><br>the baremetal host<br><br>[ ID] Interval &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transfer &nbsp;&nbsp;&nbsp;&nbsp;Bitrate &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retr<br>[ &nbsp;5] &nbsp;&nbsp;0.00-60.01 &nbsp;sec &nbsp;6.58 GBytes &nbsp;&nbsp;941 Mbits/sec &nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;sender<br>[ &nbsp;5] &nbsp;&nbsp;0.00-60.01 &nbsp;sec &nbsp;6.58 GBytes &nbsp;&nbsp;941 Mbits/sec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiver<br><br>Tests done a year and a half ago on similar hardware showing<br>the same patterns http://void.f-m.fm.user.fm/bhyve-virtio-testing.html<br>-- <br><br></div></div></blockquote></div><br><div>
<div>Best Regards,<br>Cheng Cui</div><div><br></div><br class="Apple-interchange-newline">

</div>
<br></div></body></html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51300B68-3D16-434E-8A65-696EC48FA98C>