[one-users] SMP for KVM?

Ruben S. Montero rubensm at dacya.ucm.es
Wed Jan 28 08:04:33 PST 2009


Yes this is a little bit tricky. 

The CPU value of the template represents the CPU capacity that you request for 
the VM. So you can guide the scheduler to consolidate the VMs. For example, if 
you have two VMs with CPU=0.5, both of them can be placed in one host with 1 
CPU.

In this context CPU is capacity, and not necessary related with the number of 
virtual CPUs. I could request a VM with 2 virtual CPUs but only assign half of 
the physical CPU cycles to it (i.e. CPU=0.5). 

With Xen, this is enforced with the credit scheduler. With KVM the CPU value 
is only used for consolidation, although we can get something more accurate 
adjusting the nice of the KVM process.

There are two options:
* Derive the vcpu value from CPU, something like for example round the CPU 
value up.
* Include a new parameter in the template to specify the number of virtual 
CPUs. Having two values for CPU can be misleading, though

So we need to decide on this. What do you think?

Cheers

Ruben


On Wednesday 28 January 2009 15:41:36 Soren Hansen wrote:
> Normally, I'd just file a bug with a patch to fix this, but in this
> case, the code clearly reveals that SMP for Libvirt is disabled:
>
> 110      if (!cpu.empty())
> 111      {
> 112         //file << "\t<vcpu>" << cpu << "</vcpu>" << endl;
> 113         // TODO decide about the vpcu value
> 114      }
> 115      else
>
> I'm curious: What is it that needs to be decided? Why was this disabled?

-- 
+---------------------------------------------------------------+
 Dr. Ruben Santiago Montero
 Associate Professor
 Distributed System Architecture Group (http://dsa-research.org)

 URL:    http://dsa-research.org/doku.php?id=people:ruben
 Weblog: http://blog.dsa-research.org/?author=7
             
 GridWay, http://www.gridway.org
 OpenNEbula, http://www.opennebula.org
+---------------------------------------------------------------+



More information about the Users mailing list