KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

Gigabit speeds inside guest?

Gigabit speeds inside guest?

Hi again,

I'm struggling with a problem where I'm only getting 100Mb speeds on my ethernet interfaces within the VM.

The interface in the host (which is eth1) is running at gigabit speeds (1000Mb/s), but the interface in the guests are all running at 100Mb/s.

Is this a limitation on KVM, or is there something I need to do to configure the interface to run at 1000Mb?

As a result, I'm seeing my transfer speeds all capping out at around 100 Megabit, for instance, if I run dd on a NFS4 mount, I get throughput of 10 megabytes per second:

chris@ndev:/bench/chris$ dd if=/dev/zero of=bigfile bs=16384
26106+0 records in
26106+0 records out
427720704 bytes (428 MB) copied, 42.0606 s, 10.2 MB/s

Here's a little more detail on my configuration in the host:
chris@k9[65]:~% sudo ethtool eth1
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
....

This is bridged through to the tap interfaces in my guests:
chris@k9[68]:~% brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.002191198a34 no eth1
tap1
tap2
tap3
tap4

The parameters I'm passing to qemu are:
-net nic,macaddr=DE:AD:BE:EF:04:04 \
-net tap,ifname=tap4,script=/home/chris/kvm/qemu-ifup.sh \

And the resulting interface in the guest shows up at 100Mbit:
chris@ndev:~$ sudo /sbin/ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
...

Is there anything I can do to get the full gigabit speeds?

Thanks!
Chris

Re: gigabit speeds

Hi Rothan,

There was a post on the mailing list from a user who was able to achieve this by using the virtio net drivers.

You can read the post here

http://www.mail-archive.com/kvm@vger.kernel.org/msg00419.html