[Bug 1079212] [NEW] network slow when 2 VMs using virtio net bridged to same pyhs. network device on kvm host

ITec 1079212 at bugs.launchpad.net
Thu Nov 15 14:25:43 UTC 2012


Public bug reported:

Versions:
----------

Ubuntu: 12.10
linux: 3.5.0-18-generic
bridge-utils 1.5-4ubuntu2
qemu-kvm: 1.2.0+noroms-0ubuntu2
libvirt0: 0.9.13-0ubuntu12


Problem:
----------

When bidirectionally transmitting network data from LAN to two VMs on a
KVM host via a bridged network interface, I have got a significant
performance loss compared to transmissions from LAN to only one VM on
the KVM host.

When bidirectionally transmitting to one VM I get about 1000 Mbit/s in one and 250 Mbit/s in the other direction.
When concurrently, bidirectionally transmitting to two VMs I get about 1000 Mbit/s in one and only 37 Mbit/s in the other direction.


Questions:
------------

So what is the bottle neck?
How can I reach full network bandwith?

Machines:
-----------

ubuntu5 KVM host
ubuntu1 host on same network-switch like ubuntu5
ubuntu4 host on same network-switch like ubuntu5
vm2 KVM virtual machine on ubuntu5
vm3 KVM virtual machine on ubuntu5

Network interfaces:
-----------------------
eth0:ubuntu1 (172.16.2.131) physical network interface eth0 on ubuntu1 1Gbit/s
eth0:ubuntu4 (172.16.2.134) physical network interface eth0 on ubuntu4 1Gbit/s
eth2:ubuntu5                physical network interface eth2 on ubuntu5 1Gbit/s
br2 (172.16.2.125)          network bridge on ubuntu5 that VMs connect to
vnet0                       virtual network interface that vm2 connects with to br2 (equiv. eth0 on vm2 guest system)
vnet1                       virtual network interface that vm3 connects with to br2 (equiv. eth0 on vm3 guest system)
eth0:vm2 (172.16.2.122)     virtual network interface on vm2 using virtio
eth0:vm2 (172.16.2.123)     virtual network interface on vm3 using virtio


Network map:
----------------

eth0:ubuntu1
|
switch--eth0:ubuntu4
|
eth2:ubuntu5
| 
br2-----vnet0(eth0:vm2)
|
vnet1(eth0:vm3)


Performance checks:
------------------------

Performance_01: ubuntu1 <-> vm2:
 + 1191 Mbit/s (932 Mbit/s + 259 Mbit/s)

Performance_02: ubuntu4 <-> vm3:
 + 1209 Mbit/s (938 Mbit/s + 271 Mbit/s)

Performance_03: ubuntu1 <-> vm2 & ubuntu4 <-> vm3:
 + 497 Mbit/s (475 Mbit/s + 22 Mbit/s)
 + 481 Mbit/s (466 Mbit/s + 15 Mbit/s)
---------------------------------------
 = 978 Mbit/s (941 Mbit/s + 37 Mbit/s)


Why are Performance_01 and Performance_02 not a bit more like: 2048 Mbit/s (1024 Mbit/s + 1024 Mbit/s)?
Why does it get even less, when I transfer data from/to two different VMs?
37 Mbit/s is very poor! :-(

Here is the output of the commands used:

Performance_01
-------------------

ubuntu5# bmon
  #   Interface                RX Rate         RX #     TX Rate         TX #
-------------------------------------------------------------------
ubuntu5 (source: local)
  0   br2                      143.00B            3       0.00B            0
  13  eth2                     117.02MiB      95394      47.80MiB      57761
  19  vnet1                      0.00B            0     211.00B            3
  20  vnet0                     45.84MiB      26565     113.50MiB      39413

ubuntu1# iperf -c 172.16.2.122 -t 31536000 -i 10 -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 172.16.2.122, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 172.16.2.131 port 58506 connected with 172.16.2.122 port 5001
[  4] local 172.16.2.131 port 5001 connected with 172.16.2.122 port 47751
[  5]  0.0-10.0 sec  1.02 GBytes    874 Mbits/sec
[  4]  0.0-10.0 sec    500 MBytes    420 Mbits/sec
[  5] 10.0-20.0 sec  1.08 GBytes    932 Mbits/sec
[  4] 10.0-20.0 sec    419 MBytes    351 Mbits/sec
[  4] 20.0-30.0 sec    450 MBytes    378 Mbits/sec
[  5] 20.0-30.0 sec  1.08 GBytes    932 Mbits/sec
[  4] 30.0-40.0 sec    453 MBytes    380 Mbits/sec
[  5] 30.0-40.0 sec  1.08 GBytes    932 Mbits/sec
[  5] 40.0-50.0 sec  1.08 GBytes    932 Mbits/sec
[  4] 40.0-50.0 sec    309 MBytes    259 Mbits/sec


Performance_02
-------------------

ubuntu5# bmon
  #   Interface                RX Rate         RX #     TX Rate         TX #
-------------------------------------------------------------------
ubuntu5 (source: local)
  0   br2                      352.00B            5       0.00B            0
  13  eth2                      27.59MiB      53660     117.32MiB      82784
  19  vnet1                    112.38MiB       3611      26.59MiB      37871
  20  vnet0                    169.00B            0     527.00B            7

ubuntu4# iperf -c 172.16.2.123 -t 31536000 -i 10 -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 172.16.2.123, TCP port 5001
TCP window size: 92.4 KByte (default)
------------------------------------------------------------
[  5] local 172.16.2.134 port 58403 connected with 172.16.2.123 port 5001
[  4] local 172.16.2.134 port 5001 connected with 172.16.2.123 port 41502
[  4]  0.0-10.0 sec  1.09 GBytes    934 Mbits/sec
[  5]  0.0-10.0 sec    206 MBytes    173 Mbits/sec
[  4] 10.0-20.0 sec  1.09 GBytes    940 Mbits/sec
[  5] 10.0-20.0 sec    212 MBytes    178 Mbits/sec
[  4] 20.0-30.0 sec  1.09 GBytes    940 Mbits/sec
[  5] 20.0-30.0 sec    237 MBytes    199 Mbits/sec
[  5] 30.0-40.0 sec    260 MBytes    218 Mbits/sec
[  4] 30.0-40.0 sec  1.09 GBytes    939 Mbits/sec
[  5] 40.0-50.0 sec    323 MBytes    271 Mbits/sec
[  4] 40.0-50.0 sec  1.09 GBytes    938 Mbits/sec


Performance_03
-------------------

ubuntu5# bmon
  #   Interface                RX Rate         RX #     TX Rate         TX #
-------------------------------------------------------------------
ubuntu5 (source: local)
  0   br2                      149.00B            2       0.00B            0
  13  eth2                       5.96MiB      42154     117.34MiB      81736
  19  vnet1                     55.74MiB       1185       2.38MiB      20075
  20  vnet0                     56.59MiB       1322       3.47MiB      20275

ubuntu1# iperf -c 172.16.2.122 -t 31536000 -i 10 -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 172.16.2.122, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 172.16.2.131 port 54191 connected with 172.16.2.122 port 5001
[  4] local 172.16.2.131 port 5001 connected with 172.16.2.122 port 47752
[  5]  0.0-10.0 sec  17.8 MBytes  14.9 Mbits/sec
[  4]  0.0-10.0 sec    686 MBytes    575 Mbits/sec
[  5] 10.0-20.0 sec  20.5 MBytes  17.2 Mbits/sec
[  4] 10.0-20.0 sec    666 MBytes    558 Mbits/sec
[  4] 20.0-30.0 sec    565 MBytes    474 Mbits/sec
[  5] 20.0-30.0 sec  18.1 MBytes  15.2 Mbits/sec
[  5] 30.0-40.0 sec  17.4 MBytes  14.6 Mbits/sec
[  4] 30.0-40.0 sec    563 MBytes    472 Mbits/sec
[  4] 40.0-50.0 sec    566 MBytes    475 Mbits/sec
[  5] 40.0-50.0 sec  26.2 MBytes  22.0 Mbits/sec

ubuntu4# iperf -c 172.16.2.123 -t 31536000 -i 10 -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 172.16.2.123, TCP port 5001
TCP window size:   150 KByte (default)
------------------------------------------------------------
[  3] local 172.16.2.134 port 46644 connected with 172.16.2.123 port 5001
[  5] local 172.16.2.134 port 5001 connected with 172.16.2.123 port 41503
[  5]  0.0-10.0 sec    512 MBytes    430 Mbits/sec
[  3]  0.0-10.0 sec    114 MBytes  96.0 Mbits/sec
[  5] 10.0-20.0 sec    441 MBytes    370 Mbits/sec
[  3] 10.0-20.0 sec  28.9 MBytes  24.2 Mbits/sec
[  5] 20.0-30.0 sec    548 MBytes    460 Mbits/sec
[  3] 20.0-30.0 sec  27.4 MBytes  23.0 Mbits/sec
[  5] 30.0-40.0 sec    560 MBytes    469 Mbits/sec
[  3] 30.0-40.0 sec  15.1 MBytes  12.7 Mbits/sec
[  5] 40.0-50.0 sec    556 MBytes    466 Mbits/sec
[  3] 40.0-50.0 sec  18.0 MBytes  15.1 Mbits/sec

** Affects: qemu-kvm (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in Ubuntu.
https://bugs.launchpad.net/bugs/1079212

Title:
  network slow when 2 VMs using virtio net bridged to same pyhs. network
  device on kvm host

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/1079212/+subscriptions



More information about the Ubuntu-server-bugs mailing list