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: "msgbox450@xxxxxxxxx" <msgbox450@xxxxxxxxx>
Date: Fri, 20 May 2011 18:59:36 +0100
Delivery-date: Fri, 20 May 2011 11:02:42 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=U8HHLZxHrEcQe+ep3BeTh5ZezaY8PqGIcwhM0CepXlo=; b=JVEg22UHxtckfHLeiL2jPGN1RCUFYLL0SBGDSUjSf8zTQmVkbd1zuEXKCaS+PVUWq/ BW48TGa20ChMvFjx+qmf3ykXomq4xXRc+W5MWPBHx4LHwdDV+0pUSDNeMp813kj4nRNb TiRdNmH1891XJz7sB5pITuggV/aVG/IO6zjXI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=WG6s0djygoDp7cZq8yVZlPjJWrVyVG14557GniBBHMlLnYZs2UtMP7Y2zabsiHqsiD bJg5cCIlRYlLSurxij5ROlq+pGAeIuqIwGJxtpFTN4RpwVdOHSiS2UogXPPEW4LrcuCI 6p7HBKJOtzvrLii+b9dJ3aar2TUoWCIIHKN+A=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <5696F0B71D9E44879CB5840E932188D3@maindesk>
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> <5696F0B71D9E44879CB5840E932188D3@maindesk>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thanks both. Rate limiting the individual VMs though would stop them ever being able to go beyond that rate though right? In practice I want them to be able to get 100mbit in sustained bursts (i.e. download a few big files per day) but ensure the average is around 1mbps-2mbps across the month (i.e. not constantly downloading).
Am I right in saying that the vSwitch QoS can't do that?

The idea of checking the bandwidth stats with XAPI and then updating the limit accordingly seems like the option I might have to go for, but I have no idea what the complicated algorithm I'd need to use is and it sounds painful... was really hoping there's an easier way :S

On Fri, May 20, 2011 at 6:00 PM, <admin@xxxxxxxxxxx> wrote:

You can limit the outbound bandwidth rate using the Network Properties QoS option on a per VM basis.  That would prevent of lot of potential abuse.  You would not need to limit each one to 1Mbps, though.  You could set it higher than that.

 

Alternatively, you could write an application that checked bandwidth stats using the API and then updated the QoS limit using the API.  That would permit you a lot of flexibility when writing business rules to manage it.

 

-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of msgbox450@xxxxxxxxx
Sent: Friday, May 20, 2011 11:39 AM
To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] XCP bandwidth management

 

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