WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] measuring bandwidth usage of domUs

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] measuring bandwidth usage of domUs
From: "Tim Wood" <twwood@xxxxxxxxx>
Date: Fri, 21 Apr 2006 11:51:54 -0400
Delivery-date: Fri, 21 Apr 2006 08:52:32 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=BjuQNse5/pqIjpBAjXwDGSnjrq+VWlP7JVmFbV18kcRXjBgWcF7U55mObjUdKXJyqBWmH9VyeFc5N+k6jp96Rtka2p0Iz/pwX1LXol+OZo3RCclh0nierCxQrqIpWNTp3UbGntJCX/obcuJQBnKqBksy8pdBm1Phj0xVwafJB24=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Reply-to: tinytim@xxxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi,
I'm interested in building a tool to look at the bandwidth usage of each of my VMs.

I'm sure there are complicated network managing apps that do this (naggios, etc), but I don't need anything too fancy and am assuming it should be easily scripted by pulling info from ifconfig or /proc/net/dev.

After doing a simple test I'm a little confused about how network usage gets charged to each VM, here is my example:

I copied a 16MB file from dom0 on server A  to dom1 on server B.  The machines were idle other than my scp file transfer.  The file was transferred from an NFS connected drive on A.  The VM disk image for dom1 on B is also on the same NFS drive.  I suspect that may explain some of this, but I'm not totaly sure...

I ran ifconfig before and after in dom0 on both A and B to get:

(interface:  Rx Kbytes /  Tx Kbytes)

--Server A--
eth0:  17538  /  17576
vif0:  17576  /  17538


--Server B--
eth0:  57  / 1301
vif0:  1301  /  57
vif1:  401  /  17211

My first point of confusion is that the file was transfered from A to B, so why does A have about 16MB of both RX and TX, while B only has 16MB of TX and essentially no RX??  I assume the RX/TX on A is due to copying a file from an NFS drive, so it needs to read in the file and then copy.  For B, it is reasonable that it has TX for writing the file out to the NFS drive, but doesn't it need to recieve the file? The file transfer completed succesfully and worked fine.

Am I missing something obvious here?

If anyone can point out what I'm doing wrong, or explain these numbers I'd appreciate it.

In general, my goal is to be able to detect when a physical server holding a couple VMs is reaching its maximum network capacity and then be able to tell which of the VMs on that machine are contributing the most to that total bandwidth.  If anyone has suggestions on a good way to do that, I'd be interested to hear.


Thanks!
-Tim
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] measuring bandwidth usage of domUs, Tim Wood <=