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: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] XCP bandwidth management
From: George Shuklin <george.shuklin@xxxxxxxxx>
Date: Sun, 29 May 2011 21:56:46 +0400
Delivery-date: Tue, 31 May 2011 07:51:15 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=AkvAhjzyZAo5RjvZCPD0poTCv+V7dDYCAuqntPlwXzQ=; b=BczuNKBQwqKbA7vdI1f4Ap3qfLZuRBIHFW9xH0i2vm1/fnaVFfPmvgpB8on3cNTA/7 uStPU7JXGbiW4osyJ6R6pdzQoO6+utCNehDhsITDVTSJuk2hAy1fui+Kd+4OmPXYRF/B QstxIoaFdd6aroqYeWj3J2XjPBEbSCg768cB0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=jOQJCVJJBVdWE//XtspwLJmCL/KNo7vAnOXLGW6VB/sGyjIyzhqtOgMcrtZiyDW8KW aS9iRfTHw9abv3IvYWRLr+OC5wfNmvhQ0H+NZXb2gQuA8VNRbXOt6T4cUgg5Q17aOGrk Ijzm7TUSrnLcFfgAi+QjMz4jk7jAWd0Ienjks=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTik7q4pEHUaucDbUeyYbHE1SxEz7Zw@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: <BANLkTik7q4pEHUaucDbUeyYbHE1SxEz7Zw@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110402 Icedove/3.1.9
I've tested the internal netback capabilities for shaping - it not very accurate, but working. It counts only outgoing traffic from VM. But it do not allow any burst capabilities or traffic accounting.

To enable it:


xe vif-param-set uuid= qos_algorithm_type=ratelimit
xe vif-paraxe vif-param-set uuid= qos_algorithm_params:kbps=2500

If you wish to count VM traffic you will need to dig beyond XCP into xen and dom0 linux (hint: in /sys in dom0 there is xen-backend tree with statistics counters - but this is definitely not 'XCP', it's pure hacking into Xen).


On 20.05.2011 20:38, msgbox450@xxxxxxxxx wrote:
Hi all,

I've got XCP 1.0 up and running nicely and would like to use it in production. However I'm struggling with the concept of bandwidth management. It seems like such a common problem that everyone must have, but I can't find any clear direction in which to go.
The dedicated host I am using (Hetzner) gives me a 5TB monthly bandwidth quota which needs to be shared between all the VMs on the XCP.

Ideally I would like something to automatically manage the bandwidth such that each VM is capable of using the full 100mbps speed of the connection, but will be throttled back if the throughput is sustained, so we have e.g. 24 x 1GB VMs on the host with average of 213GB/month bandwidth usage each.
Alternatively it might be easier to just route all the virtual interfaces though a VM than runs pfsense or use tc on the host to just set some sort of shaping on the physical interface itself, but I really don't know the best way to go about it.


Things I've found so far aren't so good:
1 - Limit the interface using the XenCenter GUI... but that means the VM would never be able to go above about 1mbps, even if it's sat there and used no bandwidth for the past week and is well within its quota, so that's not ideal.

2 - Use sFlow in XCP to capture the data. Well this works for looking at how much bandwidth they are using, but I haven't found any existing tool that will act on that data to do traffic shaping.

3 - Use the XAPI calls to check the bandwidth usage.


With methods 2 and 3 I guess I could write something that collects the data and stores it a database table, somehow work out how much the connection needs to be slowed by and then apply it using the XAPI, but that seems rather hacky and difficult and there must be a better way?


If anyone could give some tips on how to do this I'd really appreciate it. Basically I just want the quickest and easiest way to make it so that the server as a whole doesn't go over its bandwidth limit without limiting all the guests to a tiny speed individually.

Thanks!
_______________________________________________ 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