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,50000"

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

Reply via email to