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

Re: [Xen-users] Limit the BW and control trafic of a guest

To: Pascal <ml@xxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Limit the BW and control trafic of a guest
From: Tim Post <tim.post@xxxxxxxxxxx>
Date: Sun, 10 Jun 2007 14:15:35 +0800
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 09 Jun 2007 23:14:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <466A6D61.7030106@xxxxxxxxxxxxxxxxx>
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>
Organization: Gridnix
References: <466A6D61.7030106@xxxxxxxxxxxxxxxxx>
Reply-to: tim.post@xxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2007-06-09 at 11:05 +0200, Pascal wrote:
> Hello,
> 
> I'd like to know which solutions exists to : 
> 1- limit the bandwidth available to a guest
> 2- controls / see the trafic used by a guest
> 
> 1-
> I know that for the bandwidth we could use the TC command but when
> there is a lot of guests it becomes very hard to maintain !
> Is there others solutions ? maybe some controls panel does this ?
> which solution do you use ?

I do it the ugly way, but its very easy. I just have xendomains source a
file named just like the dom-u config with a .sh suffix. All of my extra
logging and notifying goes in that file, with the exception of some
notification stuff.

I applied a patch from Steve Kemp that helps notify me when a VM changes
state, and calls that .sh script again. So far this has worked out very
well but as you said lots of rules can be problematic.
> 
> 2-
> But I don't have any solution to control and see the trafic used by
> the guests, is there some solutions to do this ?
> The few (little) existing control panel for xen allows this ?
> enomalism ? xen-entreprise ? ... ? 
> is there others solutions to managet the trafic used by the guests ?
> 
> What kind of solutions do you use ?

If you name your vifs so that they are meaningful, its much easier. An
example :

vif [ 'bridge=br0 vifname=centos.0' ]

I could then type 'ifconfig centos.0' from dom-0 to get an accounting.
Its wise to use something that logs this incrementally because if dom-0
reboots you lost the data. Likewise, iptables logging can suffer a
similar fate if dom-0 reboots before you can save the info.

If the vifname is meaningful, short and unique this works well. 

Many /proc based bandwidth loggers dont fscanf() beyond an 8 character
name, i.e. 'eth0' is ok, but ethetheth0 would be cut off as "ethethet".
Try to keep them short, or just modify your logger to work with longer
names.

Hopefully someone else will give you a more elegant solution or point
you to something free that does a good job managing everything including
bandwidth. I don't like web based consoles, so I don't have much
experience with what else is available.

I have a tool that will XML-ify everything you need for logging on
dom-0, if your able to parse it. See
http://dev1.netkinetics.net/hg/xmlpulse.hg , this tool is nowhere near
as graceful as the new Xen API, but still rather useful.

Hope this helps :)
--Tim

> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users