[one-users] SMP for KVM?

Ruben S. Montero rubensm at dacya.ucm.es
Wed Jan 28 13:11:49 PST 2009


It makes sense.
I'll apply this one. I'll file a ticket for this and if we come out with 
something better later we can reopen it.

THANKS!!!!

Ruben

On Wednesday 28 January 2009 18:53:12 you wrote:
> On Wed, Jan 28, 2009 at 05:48:19PM +0100, Soren Hansen wrote:
> >> 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
> >
> > We could add a VCPU option to specify the number of virtual CPU's, and
> > use the CPU setting (rounded up) as the default value for the VCPU
> > setting? That way, we maintain the current semantics for the CPU
> > setting, and add a way to customise the number of virtual cpu's assigned
> > to a virtual machine.
>
> Like this:
>
> Index: opennebula-1.1.85+svn329/src/vmm/LibVirtDriver.cc
> ===================================================================
> --- opennebula-1.1.85+svn329.orig/src/vmm/LibVirtDriver.cc	2009-01-28
> 18:31:47.332999499 +0100 +++
> opennebula-1.1.85+svn329/src/vmm/LibVirtDriver.cc	2009-01-28
> 18:42:07.209030171 +0100 @@ -20,6 +20,8 @@
>  #include "Nebula.h"
>  #include <sstream>
>  #include <fstream>
> +#include <cstdlib>
> +#include <cmath>
>
>
>  int LibVirtDriver::deployment_description(
> @@ -100,17 +102,26 @@
>       //
> ------------------------------------------------------------------------
>
>
> -     vm->get_template_attribute("CPU", cpu);
> +     vm->get_template_attribute("VCPU", cpu);
>
>       if(cpu.empty())
>       {
> -         get_default("CPU",cpu);
> +         get_default("VCPU",cpu);
>       }
>
> +     if(cpu.empty())
> +     {
> +          vm->get_template_attribute("CPU", cpu);
> +     }
> +
> +     if(cpu.empty())
> +     {
> +         get_default("CPU",cpu);
> +     }
> +
>       if (!cpu.empty())
>       {
> -     	//file << "\t<vcpu>" << cpu << "</vcpu>" << endl;
> -     	// TODO decide about the vpcu value
> +     	file << "\t<vcpu>" << (int) ceil(atof(cpu.c_str())) << "</vcpu>" <<
> endl; }
>       else
>       {
>
>
>
> Feel free to prettify it. In fact, please do. :) C++ is not my language of
> choice :)

-- 
+---------------------------------------------------------------+
 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