From owner-freebsd-virtualization@freebsd.org Thu Dec 24 08:16:17 2015 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47A67A5106A for ; Thu, 24 Dec 2015 08:16:17 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com [IPv6:2607:f8b0:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0787115CF for ; Thu, 24 Dec 2015 08:16:17 +0000 (UTC) (envelope-from wanpengqian@gmail.com) Received: by mail-vk0-x22f.google.com with SMTP id a188so146212665vkc.0 for ; Thu, 24 Dec 2015 00:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=T2rCFo7Rq330WDH8yV4EKCRX9oRd1AYjywekxpVs2y4=; b=wHg8tKa5SpAAv8bhf1HtEzoYPpZ3rkCWcvft84KKAYXBYgDdDeTfd02U4tpzf+qNXe a8plgVmuAQLVMzDj6HSzLCsmTZMBd7vcmeXZkHmXb9udvDvuCyGC40+sSNmUC84zVc0H zZdK0eDajqKJC/EgsZH52OZH44+VUgTZdm36QSkE7Dd77GPI7Ps1UdB3MPqMgFcSBqlW UHzKtd910pP8I0PfWWWyhQkoB6p/BHmHKXnh8abMtwWx0WYJYf7LbwFesOm6QpwWCZfI 63DAX7BgeCJVtC5/33aGQR/E7MV4l/As09wp++3mxtGa7pn9fZG6YvdQclTAGum0Xu4O B/6Q== MIME-Version: 1.0 X-Received: by 10.31.54.149 with SMTP id d143mr22561022vka.111.1450944975839; Thu, 24 Dec 2015 00:16:15 -0800 (PST) Received: by 10.31.87.1 with HTTP; Thu, 24 Dec 2015 00:16:15 -0800 (PST) Date: Thu, 24 Dec 2015 17:16:15 +0900 Message-ID: Subject: Performance of virtio net in bhyve, Linux vs Windows 2012 From: Qian Wanpeng To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 08:16:17 -0000 I found the network performance between Linux guest and windows guest are different. Both two guest(Debian 8.0 and Windows 2012) are bridge to same bridge interface. and assign an IP to that bridge interface. In FreeBSD host, start a iperf server, both guests as iperf client. I did not tunning any parameter yet. Here is the result. Linux virtio driver is builtin Debian 8.0. and Windows virtio driver is from Redhat. 62.71.104.9600 1. TCP From Linux guest. root@vm01:~# iperf -c 10.51.197.40 -i 1 ------------------------------------------------------------ Client connecting to 10.51.197.40, TCP port 5001 TCP window size: 85.0 KByte (default) ------------------------------------------------------------ [ 3] local 10.51.197.41 port 49823 connected with 10.51.197.40 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 182 MBytes 1.53 Gbits/sec [ 3] 1.0- 2.0 sec 195 MBytes 1.63 Gbits/sec [ 3] 2.0- 3.0 sec 190 MBytes 1.60 Gbits/sec [ 3] 3.0- 4.0 sec 200 MBytes 1.68 Gbits/sec [ 3] 4.0- 5.0 sec 233 MBytes 1.96 Gbits/sec [ 3] 5.0- 6.0 sec 198 MBytes 1.67 Gbits/sec [ 3] 6.0- 7.0 sec 223 MBytes 1.87 Gbits/sec [ 3] 7.0- 8.0 sec 208 MBytes 1.74 Gbits/sec [ 3] 8.0- 9.0 sec 219 MBytes 1.84 Gbits/sec [ 3] 9.0-10.0 sec 176 MBytes 1.48 Gbits/sec [ 3] 0.0-10.0 sec 1.98 GBytes 1.70 Gbits/sec the result is reasonble. 2. TCP From Windows guest. C:\Apps\iperf_1.70>iperf -c 10.51.197.40 -i 1 ------------------------------------------------------------ Client connecting to 10.51.197.40, TCP port 5001 TCP window size: 64.0 KByte (default) ------------------------------------------------------------ [196] local 10.51.197.42 port 63676 connected with 10.51.197.40 port 5001 [ ID] Interval Transfer Bandwidth [196] 0.0- 1.0 sec 45.4 MBytes 381 Mbits/sec [196] 1.0- 2.0 sec 44.9 MBytes 377 Mbits/sec [196] 2.0- 3.0 sec 45.0 MBytes 378 Mbits/sec [196] 3.0- 4.0 sec 46.5 MBytes 390 Mbits/sec [196] 4.0- 5.0 sec 49.9 MBytes 419 Mbits/sec [196] 5.0- 6.0 sec 48.2 MBytes 405 Mbits/sec [196] 6.0- 7.0 sec 46.4 MBytes 389 Mbits/sec [196] 7.0- 8.0 sec 48.5 MBytes 407 Mbits/sec [196] 8.0- 9.0 sec 47.5 MBytes 399 Mbits/sec [196] 9.0-10.0 sec 47.4 MBytes 398 Mbits/sec [196] 0.0-10.0 sec 470 MBytes 394 Mbits/sec Compare to TCP, UDP even worst. 3. UDP From Linux guest root@vm01:~# iperf -c 10.51.197.40 -u -i 1 -b 2000M ------------------------------------------------------------ Client connecting to 10.51.197.40, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 10.51.197.41 port 37731 connected with 10.51.197.40 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 92.4 MBytes 775 Mbits/sec [ 3] 1.0- 2.0 sec 93.0 MBytes 780 Mbits/sec [ 3] 2.0- 3.0 sec 92.2 MBytes 773 Mbits/sec [ 3] 3.0- 4.0 sec 92.0 MBytes 772 Mbits/sec [ 3] 4.0- 5.0 sec 91.3 MBytes 766 Mbits/sec [ 3] 5.0- 6.0 sec 91.7 MBytes 769 Mbits/sec [ 3] 6.0- 7.0 sec 92.0 MBytes 772 Mbits/sec [ 3] 7.0- 8.0 sec 92.7 MBytes 778 Mbits/sec [ 3] 8.0- 9.0 sec 92.6 MBytes 777 Mbits/sec [ 3] 0.0-10.0 sec 922 MBytes 773 Mbits/sec [ 3] Sent 657375 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 914 MBytes 767 Mbits/sec 0.002 ms 5500/657374 (0.84%) [ 3] 0.0-10.0 sec 1 datagrams received out-of-order 4. UDP From Windows guest. C:\Apps\iperf_1.70>iperf -c 10.51.197.40 -u -i 1 -b 2000M ------------------------------------------------------------ Client connecting to 10.51.197.40, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 64.0 KByte (default) ------------------------------------------------------------ [196] local 10.51.197.42 port 62673 connected with 10.51.197.40 port 5001 [ ID] Interval Transfer Bandwidth [196] 0.0- 1.0 sec 20.8 MBytes 174 Mbits/sec [196] 1.0- 2.0 sec 19.4 MBytes 163 Mbits/sec [196] 2.0- 3.0 sec 19.3 MBytes 162 Mbits/sec [196] 3.0- 4.0 sec 21.2 MBytes 178 Mbits/sec [196] 4.0- 5.0 sec 20.1 MBytes 168 Mbits/sec [196] 5.0- 6.0 sec 21.1 MBytes 177 Mbits/sec [196] 6.0- 7.0 sec 21.9 MBytes 183 Mbits/sec [196] 7.0- 8.0 sec 18.9 MBytes 158 Mbits/sec [196] 8.0- 9.0 sec 18.6 MBytes 156 Mbits/sec [196] 9.0-10.0 sec 22.0 MBytes 184 Mbits/sec [196] 0.0-10.0 sec 203 MBytes 170 Mbits/sec [196] Server Report: [196] 0.0-10.0 sec 203 MBytes 170 Mbits/sec 1.055 ms 0/144929 (0%) [196] Sent 144929 datagrams Any idea why so different? Am I missing anything? Best Regards.