Bhyve: virtio-net very slow with FreeBSD 12.0 Host

Tommy Pham tommyhp2 at gmail.com
Sat Mar 21 07:48:52 UTC 2020


Hi Ole,

Is the slow performance in the guest?  Are you using UEFI?  If guest, have
you tried the patches in PR 236922?  I don't have bhyve in my
environment so I don't know what chipset (legacy i440fx or recent Q35)
bhyve can emulate.  The man pages and wiki didn't specify.  The original
work for the patches in that PR was done by Brian Venteicher (@FreeBSd) but
was not committed to the official source. I just made it into a patch for
my personal use and others also.  In reviewing the code to make the patch,
I noticed there are some changes to network stack.

Also, you post the "pciconf -lBbcevV" output of the guest at pastebin?

HTH,
Tommy

On Thu, Sep 26, 2019 at 5:14 AM Ole <ole at free.de> wrote:

> Hello,
>
>
> I want to push this up again. Cause I ran into it again :-(
>
> I wonder why no one else has a similar problem. I think my setup is
> very common.
>
> I made some tcpdumps during (very slow) package installation inside
> the VM.
>
> tcpdump -i igb0 | grep pkg
> tcpdump -i igb0.4030 | grep pkg
> tcpdump -i bridge0 | grep pkg
> tcpdump -i tap0 | grep pkg
>
> the very long output is here https://pastebin.com/vM1VFziJ . For me it
> looks like very normal TCP traffic. seqs and acks ...
>
> thanks
> Ole
>
> Tue, 5 Feb 2019 15:05:22 +0100 - Ole <ole at free.de>:
>
> > Hello,
> >
> > I discovered that virtio-net very slow with FreeBSD 12.0 Host. And
> > with very slow I mean 16 kBit/s.
> >
> > I can't exclude that there is a problem in my setup. But I created two
> > very similar setups. One with FreeBSD 11.2 and one with 12.0. The
> > server with 11.2 has no problem.
> >
> > Either I do something really wrong or there is a Bug in the
> > virtio-net.
> >
> >
> > Both Servers are connected to a switch, the IPs of the VMs are in the
> > vlan 4030. The Bhyve VMs are mangaed by vm-bhyve (master from
> > github).
> >
> > Bridges are created by rc.conf:
> >
> >   # Vlans
> >   vlans_em0="030"
> >   ifconfig_em0_4030="mtu 1400 up"
> >
> >   # Bridges
> >   cloned_interfaces="bridge0"
> >   ifconfig_bridge0="addm em0.4030 mtu 1400 up"
> >
> > switch definition:
> >
> >   switch_list="vm-net"
> >   type_vm-net="manual"
> >   bridge_vm-net="bridge0"
> >
> > VM config:
> >
> >   loader="bhyveload"
> >   cpu=7
> >   memory=40G
> >   network0_type="virtio-net"
> >   network0_switch="vm-net"
> >   disk0_type="virtio-blk"
> >   disk0_name="disk0"
> >   disk0_dev="sparse-zvol"
> >
> >
> > vm creation:
> >
> >   vm create -t test-host -i FreeBSD-12.0-RELEASE-amd64.raw
> > test-example-com vm start test-example-com
> >
> > Network setup (on the VM):
> >
> > root at freebsd:~ # ifconfig vtnet0 xx.xx.xx.xx/28 mtu 1400
> > root at freebsd:~ # route add default yy.yy.yy.yy
> >
> > could someone help me to figure out if this is a Bug, and if yes
> > where it is?
> >
> > Thanks
> > Ole
>
>
>


More information about the freebsd-questions mailing list