Skip to contentSkip to conversation

Different network traffic measures (dom0 vs. domU)

DISCUSSION Maykel Moya 1 participant 1 message Jan 25, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I'm using Xen 4.0.1 with Linux 2.6.32-5-xen-amd64 (standard packages on a Debian Squeeze system).

Quoted 1 line

From Xen Networking:

"Think of them (vif<id#>.0 @dom0 and eth0 @domU) as two ethernet interfaces connected by an internal crossover ethernet cable."

My understanding of this internal crossover thing is that networking statistics should be the same no matter if you measure it in the dom0 (vifN.N interface) or in the domU (eth0 interface). RX/TX values should be the same, just inverted.

Nevertheless I'm getting ~20% larger values when traffic is measured in dom0.

Just after starting the domU I ran this on the dom0:
.

root@dev1:~# while true; do date; cat
/sys/class/net/vif35.0/statistics/{r,t}x_bytes; sleep 1; done
...
Thu Jan 19 13:18:00 EST 2012
4826
466049
Thu Jan 19 13:18:01 EST 2012
4826
466580
Thu Jan 19 13:18:02 EST 2012
4826
467427
Thu Jan 19 13:18:03 EST 2012
4826
467910
Thu Jan 19 13:18:04 EST 2012
4826
468769
Thu Jan 19 13:18:05 EST 2012
4826
469764

and in the domU

root@node2050:~# while true; do date; cat
/sys/class/net/eth0/statistics/{r,t}x_bytes; sleep 1; done
 ...
Thu Jan 19 13:18:00 EST 2012
395229
5792
Thu Jan 19 13:18:01 EST 2012
395961
5792
Thu Jan 19 13:18:02 EST 2012
396617
5792
Thu Jan 19 13:18:03 EST 2012
397304
5792
Thu Jan 19 13:18:04 EST 2012
397735
5792
Thu Jan 19 13:18:05 EST 2012
398620
5792

I didn't found any relevant in Google. Posted a question in serverfault
(http://j.mp/zzDPuV), and there is no an answer yet. Asked in xen-users and got no answer.

Do anybody have a clue about why the values are (that) different? Seems to me a Xen bug but I might be missing something.

Regards,
maykel