Re: [one-users] [patch] Add support for rate-limiting a NIC on XEN

2011-06-09 Thread Jaime Melis
Hi Vivien,

first of all thanks a lot for your ideas and for your patch. This feature
seems quite interesting, we have created a new feature issue in Redmine:
http://dev.opennebula.org/issues/673

As for the RAW section under an attribute, that's actually a very good idea,
and with xen it's easily achievable, but adding support for it with libvirt
should be a little bit trickier, since it needs to be rendered as XML (a
libvirt domain file). We will study this further to see how could we support
it.

cheers,
Jaime

On Tue, Jun 7, 2011 at 2:00 PM, Vivien Bernet-Rollande <
vivien.bernet-rolla...@nexen.alterway.fr> wrote:

> Hi everyone.
>
> I've a lot of hopes set on those networking setup and teardown hooks that
> were discussed during yesterday's session. They would allow me to have much
> finer control on quite a few items (filtering, traffic shaping, etc.) while
> keeping support for migration.
>
> Anyway, in the meantime, I have a use case where I need to be able to limit
> the upload rate of a VM. Basically, we bill clients based on their upload
> traffic. We need the ability to cap clients who wish to make sure they never
> go over their quota.I'd rather do this in dom0 with tc, which allows for
> nice burst control, but the hooks I would need don't exist yet.
>
> The patch I propose ( see
> http://dev.opennebula.org/attachments/385/one_xen_rate_limit.diff ) adds
> support for rate limiting using the "rate" configuration parameter for a Xen
> vif. There is no support for KVM since I can't test it, but I doubt it would
> be hard to add. There is no support in Sunstone or the various API servers
> either.
>
> The ONE config simply file goes like this :
>
> NIC  = [ NETWORK = "INTERNET",
> RATE = "10Mb/s" ]
>
> This will create the following deployment file :
> vif = [
>'mac=02:00:01:02:03:04,ip=1.2.3.4,bridge=xenbr0,rate=10Mb/s',
> ]
>
> And a "xenstore-ls" will show :
> ma
> /local/domain/0/backend/vif/20/0/rate = "62500,5"
>
> Iperf tests show an effective upload rate of 7-8 Mb/s, so provisioning a
> bit over the desired value seems to be necessary.
>
>
> Something I'd really love to see would be the ability to add raw data on a
> vif or block device. That way, I could have solved my issue using something
> like :
>
> NIC  = [ NETWORK = "INTERNET",
> RAW = "rate=10Mb/s" ]
>
> --
> Vivien Bernet-Rollande
> Systems&  Networking Engineer
> Alter Way Hosting
>
> ___
> Users mailing list
> Users@lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Jaime Melis, Cloud Technology Engineer/Researcher
Major Contributor
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jme...@opennebula.org
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


[one-users] [patch] Add support for rate-limiting a NIC on XEN

2011-06-07 Thread Vivien Bernet-Rollande

Hi everyone.

I've a lot of hopes set on those networking setup and teardown hooks 
that were discussed during yesterday's session. They would allow me to 
have much finer control on quite a few items (filtering, traffic 
shaping, etc.) while keeping support for migration.


Anyway, in the meantime, I have a use case where I need to be able to 
limit the upload rate of a VM. Basically, we bill clients based on their 
upload traffic. We need the ability to cap clients who wish to make sure 
they never go over their quota.I'd rather do this in dom0 with tc, which 
allows for nice burst control, but the hooks I would need don't exist yet.


The patch I propose ( see 
http://dev.opennebula.org/attachments/385/one_xen_rate_limit.diff ) adds 
support for rate limiting using the "rate" configuration parameter for a 
Xen vif. There is no support for KVM since I can't test it, but I doubt 
it would be hard to add. There is no support in Sunstone or the various 
API servers either.


The ONE config simply file goes like this :

NIC  = [ NETWORK = "INTERNET",
 RATE = "10Mb/s" ]

This will create the following deployment file :
vif = [
'mac=02:00:01:02:03:04,ip=1.2.3.4,bridge=xenbr0,rate=10Mb/s',
]

And a "xenstore-ls" will show :
ma
/local/domain/0/backend/vif/20/0/rate = "62500,5"

Iperf tests show an effective upload rate of 7-8 Mb/s, so provisioning a 
bit over the desired value seems to be necessary.



Something I'd really love to see would be the ability to add raw data on 
a vif or block device. That way, I could have solved my issue using 
something like :


NIC  = [ NETWORK = "INTERNET",
 RAW = "rate=10Mb/s" ]

--
Vivien Bernet-Rollande
Systems&  Networking Engineer
Alter Way Hosting

___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org