Rate limits on Xen systems

5 posts / 0 new
Last post
#1 Tue, 07/07/2009 - 17:18
FilipeLacerda

Rate limits on Xen systems

For sure this is a must have for Xen systems in Cloudmin. The ability to specify granularity on the vif interface on Xen systems would much improve the possibility to create different rates for different customers, preventing abuses and preserving quality of service in certain cases.

I was searching a bit and found out that rates can by defined in the vif=[''] brackets, in the Xen system .cfg file like this:

'rate=5Mb/s' 'rate=512KB/s' 'rate=2MB/s@30ms'

So, for now, i can see that Cloudmin has the option to give a vifname, in the Systems Creation. Will it be able to do the following ones ?

'script', 'ip', 'bridge', 'mac', 'type', 'rate'

Regards, F

ps -Still have to see what type and script stands for :)

Tue, 07/07/2009 - 19:07
FilipeLacerda

Well, i've continued my little crusade for rate limits...

I have to configure the vif line by hand on the .cfg file for the testing xen machine. I did discoverd some interesting facts:

  1. rate limits dont apply form exterior to downloading from outside the VM
  2. Rates do apply for "giving" information / Data, from the VM to the outside world.

test 1 0% [ ] 891,695 29.2K/s eta 56m 21s ^C

test 2 1% [ ] 1,654,791 106K/s eta 15m 59s ^C

test 3 68% [=========================> ] 69,358,552 5.18M/s eta 12s ^71%

This was all tested in a VM with the following configuration:

[root@formador xen]# cat teste5.cfg kernel = '/xen/vmlinuz-vm2-xenU' ramdisk = '/xen/initrd.vm2.xenU.img' memory = 256 name = 'teste5' address = '192.168.122.180' netmask = '255.255.255.0' disk = ['file:/xen/teste5.img,sda1,w'] root = '/dev/sda1 ro' vif=['rate=7096KB/s'] vnc = 5901 vnclisten = "127.0.0.1" vncdisplay = 1 vncpasswd = "xpto?????"

I also decided to check on xenstore-ls if XEN was actually putting rates on the vifs .

xenstore-ls /local/domain/0 | grep rate
rate = "150000,50000"

This rate is correct for rate=3MB/s

Well... for limiting my clients for a particular plan it works for me.... for now. Using this, they wont be able to "serve" more than the rate that I define, but will be able to download at will, when inside the VM of course.

I did try to use the "other configuration options" when creating the Xen System. However, i was presented with an error in the .cfg file when starting the VM. I went to read the .cfg file and discovered that Cloudmin script wrote a newline in the .cfg file with the option that i used (rate=7096KB/s) :

.... vif=[''] rate=7096KB/s ....

So if it could be done the same thing as the vif name, that actually writes between the brackets of the vif line ( vif=['vifname=myVif'] ), and we would have then the rate limits for a particular VM already when creating it, without the work of manually configure it after the creation.

Just a sugestion....

Regards, F

Tue, 07/07/2009 - 19:50
feijao

Yes, this should be great. Even if downloads don't get limited, the uploads are.

What about cpu scheduling definitions?

Tue, 07/07/2009 - 20:04 (Reply to #3)
FilipeLacerda

Hi feijao, cpu sheduling ? what kind of sheduling ?

In the VM machine panel, in cloudmin, you have Resources option > Manage Virtual CPUs. You can them choose to use a specific CPU or any CPU, just one or several....

Was this your question? Otherwise, opening a new topic might help :) F

Wed, 07/08/2009 - 06:37 (Reply to #4)
pcardoso
Topic locked