From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Bareiro Subject: Bandwidth in KVM VM with OpenBSD Date: Sun, 9 Jan 2011 14:22:35 -0300 Message-ID: <20110109172235.GD1757@defiant.freesoftware> Reply-To: dbareiro@gmx.net Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wLAMOaPNJ0fu1fTG" To: KVM General Return-path: Received: from mailout-de.gmx.net ([213.165.64.22]:52302 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1751848Ab1AIRWm (ORCPT ); Sun, 9 Jan 2011 12:22:42 -0500 Received: from defiant (defiant.freesoftware [10.1.0.65]) by hermes.freesoftware (Postfix) with ESMTP id 5B19F62B for ; Sun, 9 Jan 2011 14:20:32 -0300 (ART) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: --wLAMOaPNJ0fu1fTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all! I'm using an OpenBSD VM with qemu-kvm 0.12.5 (Debian repositories) and Linux 2.6.34.5 compiled with the kernel.org sources. I'm seeing a important difference in the bandwidth when I make a transfer to or from a OpenBSD VM. Here are some results: bsd:~# iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 4] local 10.1.0.43 port 5001 connected with 10.1.0.65 port 55049 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 25.2 MBytes 21.1 Mbits/sec [ 4] local 10.1.0.43 port 5001 connected with 10.1.0.65 port 55050 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 25.3 MBytes 21.2 Mbits/sec [ 4] local 10.1.0.43 port 5001 connected with 10.1.0.65 port 55051 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 24.5 MBytes 20.5 Mbits/sec [ 4] local 10.1.0.43 port 5001 connected with 10.1.0.65 port 55054 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 24.1 MBytes 20.2 Mbits/sec [ 4] local 10.1.0.43 port 5001 connected with 10.1.0.65 port 55055 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 26.5 MBytes 22.2 Mbits/sec [ 4] local 10.1.0.43 port 5001 connected with 10.1.0.65 port 55057 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 28.9 MBytes 24.2 Mbits/sec I also did some tests with scp, presenting a "stalled" state at various times of the transfer: ss01:/usr/src# scp linux-2.6.34.5.tar.bz2 viper@bsd:/tmp/ viper@bsd's password: linux-2.6.34.5.tar.bz2 = 100% 65MB 1.3MB/s 00:51 Another test: ss01:/usr/src# cat linux-2.6.34.5.tar.bz2 | nc -l -p 2222 -q 0 bsd:~# nc ss01 2222 | pv | dd of=3D/dev/null 64.5MB 0:00:48 [1.32MB/s] [ = <=3D> ] 132161+1 records in 132161+1 records out 67666495 bytes transferred in 48.766 secs (1387557 bytes/sec) Using the same test on a Debian GNU/Linux VM: debian-test2:~# iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 10.1.0.45 port 5001 connected with 10.1.0.65 port 42905 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.1 sec 111 MBytes 92.1 Mbits/sec [ 5] local 10.1.0.45 port 5001 connected with 10.1.0.65 port 42906 [ 5] 0.0-10.0 sec 110 MBytes 92.0 Mbits/sec [ 4] local 10.1.0.45 port 5001 connected with 10.1.0.65 port 42907 [ 4] 0.0-10.1 sec 110 MBytes 91.6 Mbits/sec [ 5] local 10.1.0.45 port 5001 connected with 10.1.0.65 port 42908 [ 5] 0.0-10.0 sec 106 MBytes 88.4 Mbits/sec [ 4] local 10.1.0.45 port 5001 connected with 10.1.0.65 port 42909 [ 4] 0.0-10.0 sec 109 MBytes 91.0 Mbits/sec [ 5] local 10.1.0.45 port 5001 connected with 10.1.0.65 port 42910 [ 5] 0.0-10.0 sec 107 MBytes 89.4 Mbits/sec ---------------------------------------------------------------------- ss01:/usr/src# scp linux-2.6.34.5.tar.bz2 root@debian-test2:/tmp/ root@debian-test2's password: linux-2.6.34.5.tar.bz2 = 100% 65MB 12.9MB/s 00:05 ---------------------------------------------------------------------- ss01:/usr/src# cat linux-2.6.34.5.tar.bz2 | nc -l -p 2222 -q 0 debian-test2:~# nc ss01 2222 | pv | dd of=3D/dev/null 64,5MB 0:00:04 [14,9MB/s] [ <=3D> = ] 132161+1 records in 132161+1 records out 67666495 bytes (68 MB) copied, 4,3326 s, 15,6 MB/s In Debian virtual machines I use Virtio (disk only). But this substantial difference may be due to the use of Virtio or another reason? The network interface I'm using OpenBSD is a e1000. The network interface used in Debian virtual machine is a Realtek. Thanks in advance for your reply. Regards, Daniel --=20 Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37 Powered by Debian GNU/Linux Lenny - Linux user #188.598 --wLAMOaPNJ0fu1fTG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAk0p7tsACgkQZpa/GxTmHTd68wCeKr6bxqXAkvGtYhzSzXY3S/RW xTAAoI9fRZNxDDymRxv2JNHDjFOYFo+Z =mkET -----END PGP SIGNATURE----- --wLAMOaPNJ0fu1fTG--