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.