How to set 1 Gbps connectivity between two VMs on KVM?

1

I want to run few benchmarks, which require 1Gbps connectivity between two VMs on the same physical host. I found on the web, that using virtio as my network card adapter should do that for me, but I am getting speed of only 400-500 Mbits/second.

My ethernet card for host base is 1000Mbps

Settings for eth0:

  • Supported ports: [ FIBRE ]
  • Supported link modes: 1000baseT/Full
  • Supports auto-negotiation: Yes
  • Advertised link modes: 1000baseT/Full
  • Advertised pause frame use: No
  • Advertised auto-negotiation: Yes
  • Link partner advertised link modes: Not reported
  • Link partner advertised pause frame use: No
  • Link partner advertised auto-negotiation: No
  • Speed: 1000Mb/s
  • Duplex: Full
  • Port: FIBRE
  • PHYAD: 1
  • Transceiver: internal
  • Auto-negotiation: on
  • Supports Wake-on: g
  • Wake-on: g
  • Link detected: yes

But my virtual network interface is only 10mbps.

Settings for vnet0:

  • Supported ports: [ ]
  • Supported link modes:
  • Supports auto-negotiation: No
  • Advertised link modes: Not reported
  • Advertised pause frame use: No
  • Advertised auto-negotiation: No
  • Link partner advertised link modes: Not reported
  • Link partner advertised pause frame use: No
  • Link partner advertised auto-negotiation: No
  • Speed: 10Mb/s
  • Duplex: Full
  • Port: Twisted Pair
  • PHYAD: 0
  • Transceiver: internal
  • Auto-negotiation: off
  • MDI-X: Unknown
  • Current message level: 0xffffffa1 (-95)
  • Link detected: yes

Any idea, where am I falling short?

akshay singh

Posted 2011-12-20T15:28:15.567

Reputation: 11

Mainly on choice of the site. It has not much to do with programming... – glglgl – 2011-12-20T15:35:19.493

Change the guest Virtual NICs to gigabit? – kobaltz – 2011-12-20T21:15:09.353

Answers

1

I suspect that the virtio driver is reporting the speed incorrectly (since it doesn't really have a maximum speed). Also, the physical host's NIC doesn't affect traffic between VMs. Pushing that much traffic requires a fair amount of work by the host, so you're probably limited by that. What is the CPU usage of the host during the test? Later versions of KVM have some performance improvements with regard to networking, so you may want to consider upgrading if you need the additional performance.

mgorven

Posted 2011-12-20T15:28:15.567

Reputation: 2 539

Yes.. lateri found out it was limited by CPU and the physical NIC has nothing to do with inter-VM connectivity

looks like there was some problem in VM-configs – akshay singh – 2012-07-18T21:13:12.383