[Differential] D20276: [bhyve][virtio-net] Allow guest VM's to set JUMBO MTU in case of using the VALE switch.
aleksandr.fedorov_itglobal.com (Aleksandr Fedorov)
phabric-noreply at FreeBSD.org
Thu May 16 11:23:42 UTC 2019
aleksandr.fedorov_itglobal.com created this revision.
aleksandr.fedorov_itglobal.com added reviewers: bhyve, jhb, rgrimes, krion, v.maffione_gmail.com.
Herald added a subscriber: bcran.
REVISION SUMMARY
Сurrent implementation of the virtio-net backend doesn't allow to transfer of packets larger than the netmap(4) buffer size (2048) or maximum guest descriptor size for tap(4) case. The reason is that there is no support for merge-able buffers (VIRTIO_NET_F_MRG_RXBUF in virtio specifications). See PR: 215737 This significantly limits the TCP throughput.
This patch adds support for mergable buffers using netmap's ability to chain it's own buffers (see NS _MOREFRAG, netmap(4)). The same approach is used by QEMU (virtio-net + netmap backend).
We are seeing a significant increase in throughput both for transferring data between VM's on the same host, and between VM's on different hosts. See tests below.
TEST PLAN
**1. 'iperf3 -c X.X.X.X -t 60 -R' between 2 Ubuntu 16.04 VM's through VALE switch.**
MTU 1500. VM - virtio-net - VALE - virtio-net - VM:
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-60.04 sec 28.6 GBytes 4.09 Gbits/sec 3 sender
[ 5] 0.00-60.04 sec 28.6 GBytes 4.09 Gbits/sec receiver
MTU 3000. VM - virtio-net - VALE - virtio-net - VM (MTU 3000):
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-60.04 sec 51.8 GBytes 7.42 Gbits/sec 651 sender
[ 5] 0.00-60.04 sec 51.8 GBytes 7.42 Gbits/sec receiver
MTU 9000. VM - virtio-net - VALE - virtio-net - VM:
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-60.04 sec 99.7 GBytes 14.3 Gbits/sec 100 sender
[ 5] 0.00-60.04 sec 99.7 GBytes 14.3 Gbits/sec receiver
MTU 16000. VM - virtio-net - VALE - virtio-net - VM:
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-60.04 sec 122 GBytes 17.5 Gbits/sec 0 sender
[ 5] 0.00-60.04 sec 122 GBytes 17.5 Gbits/sec receiver
MTU 32000. VM - virtio-net - VALE - virtio-net - VM:
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-60.04 sec 152 GBytes 21.7 Gbits/sec 64 sender
[ 5] 0.00-60.04 sec 152 GBytes 21.7 Gbits/sec receiver
MTU 64000. VM - virtio-net - VALE - virtio-net - VM:
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-60.04 sec 220 GBytes 31.4 Gbits/sec 60 sender
[ 5] 0.00-60.04 sec 220 GBytes 31.4 Gbits/sec receiver
**2. 'iperf3 -c X.X.X.X -t 60 -R' between 2 FreeBSD 12 RELEASE VM's through VALE switch.**
MTU 1500. VM - virtio-net - VALE - virtio-net - VM: 1.30 Gbits/sec
MTU 3000. VM - virtio-net - VALE - virtio-net - VM: 2.14 Gbits/sec
MTU 9000. VM - virtio-net - VALE - virtio-net - VM: 4.80 Gbits/sec
MTU 16000. VM - virtio-net - VALE - virtio-net - VM: 7.25 Gbits/sec
MTU 32000. VM - virtio-net - VALE - virtio-net - VM: 12.8 Gbits/sec
MTU 64000. VM - virtio-net - VALE - virtio-net - VM: 13.3 Gbits/sec
REVISION DETAIL
https://reviews.freebsd.org/D20276
AFFECTED FILES
usr.sbin/bhyve/pci_virtio_net.c
EMAIL PREFERENCES
https://reviews.freebsd.org/settings/panel/emailpreferences/
To: aleksandr.fedorov_itglobal.com, #bhyve, jhb, rgrimes, krion, v.maffione_gmail.com
Cc: freebsd-virtualization-list, evgueni.gavrilov_itglobal.com, bcran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20276.57439.patch
Type: text/x-patch
Size: 9599 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20190516/aedb2229/attachment.bin>
More information about the freebsd-virtualization
mailing list