[Pkg-xen-devel] Bug#658263: xen-hypervisor-4.0-amd64: Different network traffic values from dom0 vs domU
Maykel Moya
mmoya at mmoya.org
Wed Feb 1 16:10:25 UTC 2012
Package: xen-hypervisor-4.0-amd64
Version: 4.0.1-4
Severity: normal
Xen Networking[1] works by creating a new pair of virtual ethernet
interfaces (vifN.M in dom0 and ethM in domU with id N) and connecting
then by an internal "crossover ethernet cable".
My understanding of the "internal crossover" thing is that networking
statistics should be the same no matter if you measure it in the dom0
or in the domU. RX/TX values should be the same, just inverted.
I'm getting ~20% larger values when measuring traffic in the dom0.
If some obscure feature/bug is causing ocassional "injection" of
traffic, a ~20% seems too much to me. Think, for example, on billing
clients based on traffic measured from the dom0.
To reproduce just launch a new domain an look for correspondent
/sys/class/net/<iface>/statistics/{r,t}x_bytes values.
root at dev1:/etc/xen# xm create node2050.cfg
Using config file "./node2050.cfg".
Started domain node2050 (id=35)
root at dev1:/etc/xen# xm list node2050
Name ID Mem VCPUs State Time(s)
node2050 35 256 1 -b---- 2.5
root at dev1:/etc/xen# ip address show vif35.0
70: vif35.0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 32
link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
inet6 fe80::fcff:ffff:feff:ffff/64 scope link
valid_lft forever preferred_lft forever
node2050:~# ip address show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:16:3e:44:2e:5a brd ff:ff:ff:ff:ff:ff
inet xx.yy.zz.50/24 brd xx.yy.zz.255 scope global eth0
inet6 fe80::216:3eff:fe44:2e5a/64 scope link
valid_lft forever preferred_lft forever
Values in dom0:
root at 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
Values in domU:
root at 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
Kind regards,
maykel
[1] http://wiki.xen.org/wiki/Xen_Networking#Virtual_Ethernet_interfaces
-- System Information:
Debian Release: 6.0.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
xen-hypervisor-4.0-amd64 depends on no packages.
Versions of packages xen-hypervisor-4.0-amd64 recommends:
ii xen-utils-4.0 4.0.1-4 XEN administrative tools
Versions of packages xen-hypervisor-4.0-amd64 suggests:
pn xen-docs-4.0 <none> (no description available)
-- no debconf information
More information about the Pkg-xen-devel
mailing list