[one-users] CPU parameter with KVM

Javier Fontan jfontan at opennebula.org
Thu May 17 02:18:13 PDT 2012


As you say for KVM we only use this parameter as a hint to the
scheduler on how to place VMs. We have been checking different ways on
enforcing these parameters (alongside network and disk io) and this
for sure will be a future development.

For xen hypervisor we change the parameters of the credit scheduler
[1]. Specifically we set up the weight of the VM using the CPU
assigned. This wont be a hard limit but it is helpful when several VMs
are competing for the CPU. If the machine has enough free CPU any VM
could be all the time running. When competing a VM with CPU=1 will be
the double of the time running than a machine with CPU=0.5.

If you need to cap the VMs in xen the change is fairly easy, just take
a look at deploy script from the xen vmm. [2]

[1] http://wiki.xensource.com/xenwiki/CreditScheduler
[2] https://github.com/OpenNebula/one/blob/master/src/vmm_mad/remotes/xen/deploy#L51

On Wed, May 9, 2012 at 3:02 PM, Antonio Carlos Salzvedel Furtado
Junior <acsfj08 at inf.ufpr.br> wrote:
> Hello OpenNebula users,
>
>
> I defined one VM template with the following attributes:
> CPU=0.5
> VCPU=1
>
> As I read in the OpenNebula Documentation, this should give my VM half a
> processor. The problem is that I don't think the CPU parameter is ever used.
> I took a look at deployment.0 and at source code and I found out that only
> the parameter VCPU is used when KVM is chosen as hypervisor.
>
> In fact, I ran on my VM  the command 'stress -c 50', so it would force the
> VM to use all the available CPU. The VM used all the processor, and not only
> half.
>
>
> I was wondering what you guys use to define a hard limit. Can cgroups solve
> my problem and be easily integrated with OpenNebula?
>
>
> Cordially,
>
> Antonio Carlos Furtado
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Javier Fontán Muiños
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula



More information about the Users mailing list