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] XCP bandwidth management

To: "msgbox450@xxxxxxxxx" <msgbox450@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] XCP bandwidth management
From: Alexandre Bezroutchko <abb@xxxxxxxxx>
Date: Mon, 23 May 2011 13:57:25 +0200
Cc:
Delivery-date: Thu, 02 Jun 2011 14:40:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTing8s=OErpx_bT13Eyu5BS-jDFB-g@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4dd95da0.0427650a.7e16.4699SMTPIN_ADDED@xxxxxxxxxxxxx> <4DD97482.80400@xxxxxxxxx> <BANLkTing8s=OErpx_bT13Eyu5BS-jDFB-g@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10

Do you know of any better documentation for the ovs-vsctl? Maybe there is an answer there but I can't seem to find a full syntax explanation :(
I have found a lot of useful info here http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf (also see http://openvswitch.org/?page_id=14). I don't expect you will find a full solution there.

For the sFlow collector, it's one we wrote ourselves...not really too sure it's working right though because we seem to get multiple readings for the same interface. Also, not sure how to stop it being easily floodable (sFlow would be in a domU so if another domU floods it with these sFlow packets it would screw up the results I guess).
Would creating a dedicated network for sFlow-collector domU solve the problem? Normally your management network should be isolated from untrusted domUs already, so you could use it for sFlow-collector domU too.

I guess the ideal solution for me would be to have a VM guest that logs all the traffic, does some calculations. I want to check if the VM is averaging too fast across the month to meet its monthly target, and if it is,slow it down until the target is met (using 95 percentile perhaps to ignore spikes of activity).

Really don't know how to achieve that with what's available :(
As far as I can see, there are three pieces in this puzzle: 1) traffic usage metering; 2) control algorithm to decide when it is time to apply a quota; 3) policing mechanism to cap the bandwidth of the offending VMs

Problem #1 is pretty much solved. It can be done with sFlow collector or like this http://www.falsyana.com/2011/loeniks/xenserver-customization-bandwidth/. I currently use approach similar to the latter, but I save interface counters in RRD files, for the history.

Exact solution for problem #2 will probably vary greatly from installation to installation. Effectively we are talking about developing a system which takes set of timestamped values (vm_uud; vif_uud; rx_bytes; tx_bytes) as input and produces (vif_uuid; ingress_poliing_rate; ingress_poliing_burst) values as output.

Regarding problem #3 -- it is easy to limit traffic from VM, I trust it is possible to limit it in other direction too, but I didn't have enough time to make it work. One catch with limiting egress traffic is that here we actually have no control over how much stuff Internet hosts send to the IP address of VM. By limiting we are talking about dropping the excess of the traffic and hoping TCP will throttle down accordingly, which normally it will do.

Another aspect of problem #3 is how to transfer the policy from sFlow domU to dom0. I would do it by publishing desired policy on sFlow domU. It can be a simple as putting a plain text file on HTTP server, or maybe having LDAP server on sFlow domU, if it is justified. Then a cron job in dom0 would poll the desired policy from sFlow domU and reconfigure vswitch accordingly. Alternatively, one can push the config from sFlow domU into dom0 over native vSwitch API, but I feel it is less preferable from security point of view. I would prefer to keep my dom0 shut, even from trusted systems I own.

Wanna trade ;) your sFlow collector for vif script patch? The patch does bandwidth limiting (hardcoded value) and MAC/IP spoofing and ARP poisoning protection (allowed IP taken from VM other-config parameter). Actually I was going to publish the it anyway, if there is any interest...

Cheers,
Alex

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>