[one-users] The CPU template variable doesn't seem to work ...

Shi Jin jinzishuai at gmail.com
Wed Apr 28 06:41:20 PDT 2010


HI Florian,

I assume you are using KVM.

My understanding is that CPU does not directly control how much real
CPU power the VM gets.
If your physical host has enough cores, you always have VCPU number of
cores equivalent of power, just like shown in your test.
CPU comes into play only as a scheduling variable. For example, you
have only 1 physical cpu and 1 core, if you set CPU=25%, you can
deploy 4 similar VM on this host. Since there are 4 VM processes
sharing a single physical core, each VM only gets 25% of the power of
a single core. If you set CPU=100%, the scheduler will only allow no
more than 1 VM.

This setup has a fundamental limitation in the sense that we cannot
have mixed CPU numbers and assure fair power distribution according to
their CPU value.  I am also looking for a more accurate way to assure
quality of service for KVM VMs.

Shi

On Wed, Apr 28, 2010 at 6:59 AM, florian chazal <florianchazal at gmail.com> wrote:
> Hi all,
>
> I don't if I guess well but I did some test of CPU varaible and I obtain
> this result :
>
> - CPU = 25%, VCPU = 1 (default value) :  VM has 1 CPU and can use 100\% of
> it,
> - CPU = 100%, VCPU = 1 : VM has 1 CPU and can use 100% of it,
> - CPU = 200%, VCPU = 1 : VM has 1 CPU  and can use 100% of it,
> - CPU = 100%, VCPU = 2 : VM has 2 CPUs and can use 100% of them, that is to
> say 200\%,
> - CPU = 200%, VCPU = 2 : VM has 2 CPUs and can use 100% of them, that is to
> say 200\%.
>
> Therefore I conclued that the manager is ont using the variable or is not
> able to limit the CPU comsuption of one vm on a single processor.
> Am I right? Is it a bug?
> Thanks in advance .
>
>
> ps :  I did this test with a c script with an infinite loop launch on the vm
> and I check the result on the node with a htop command.
> --
> Florian Chazal
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



-- 
Shi Jin, Ph.D.



More information about the Users mailing list