1

we are doing some VM (citrix-xen) / real machine benchmarks at university and ran accross a strange behavior. we used netperf's stream test to meassure the performance between the two machines. both resulted in the same value of 940 mbit, but the output of /proc/net/dev was different:

117 MB/sec vs. 112 MB/sec.

I tried to reproduce this situation with VirtualBox at home. I meassured the displayed traffic with nload on the VM and on the VM's host.

When using emulated 1000mbit device:

vm says: 107 MB/sec
vm host says: 107 MB/sec

both values match. so far so good. but when using virtio-net device:

vm says: 102 MB/sec
vm host says: 107 MB/sec

the values do not match. so the culprit seems to be the paravirtualized network device. does anybody know about this problem? i guess, normally the "bytes" listed from /proc/dev/net are for ethernet frames and when using paravirtualized devices, it lists only the packet's bytes (without headers) as the VM-host does the whole packet handling?

thx for any suggestions :)

EDIT1:

i just used wireshark for some tests. Wireshark says: 1514 bytes on wire, and one packet contains 1448 bytes of data. To get from 1448 one needs to multiply by 1,0456 (circa). when multiplying 102 MB from above, we get 106,7 MB => ~107 MB

=> Seems to be proven that paravirtualized network skips header-bytes in /proc/net/dev

EDIT2:

i am not asking if paravirtualized network is faster than emulated one. I already know that this is a given. As one can see from my mentioned values, the traffic was in both cases 107 MB/sec (with different CPU usage of course).

But /proc/net/dev lists different values within the VM. Within the host, both values are the same! So i am asking if /proc/net/dev/ lists different values (e.g. without packet headers) when using paravirtualized network drivers.

kazu
  • 11
  • 2

1 Answers1

0

Yes. The virtual network device can send data faster than the advertised speed by the NIC.

You can also benchmark this over the local host to see this.

Some great references on benchmarking and troubleshooting virtual networks:

http://wiki.xen.org/xenwiki/Network_Throughput_Guide

http://openvswitch.org/papers/hotnets2009.pdf

Todd Deshane
  • 463
  • 2
  • 6
  • i'm not asking if paravirtualized is faster. i my case both values were equal (107 MB/sec). But within the vm, nload displays a lower value than the vm's host does. That was my question. – kazu Sep 18 '11 at 09:34
  • I understand your question better now. You are asking if the PV NIC driver exports a different value than would be expected... I think you may have better luck asking the Citrix XenServer developers. Some places to try include the Citrix XenServer forum, #citrix or #xen-api on freenode, and as a last resort (since the Xen.org support is for the open source versions of Xen) the Xen.org mailing lists (xen-devel, xen-api, or xen-users). – Todd Deshane Sep 20 '11 at 00:43