[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Looking for clarity about physical cores/cpus and VCPUs



> I'm looking for a clear explanation of how the CPU scheduling works and the
> correspondence between physical CPUs and VCPUS.
>
> The Xen manuals state that there is "up to 32 virtual CPUs per guest
> virtual machine".
>
> So, If I have a server with 64 physical CPUs, and I boot into Xen, with
> dom0_max_vcpu set to 1, and I have 2 guest domains, like this:
>
> Dom0 (1 vcpu)
> Guest1 (15 vcpu)
> Guest2 (16 vcpu)
>
> What is the actual correspondence between the virtual CPUs and physical
> CPUs?

That depends on whether you restrict some VCPUs to only run on some PCPUs.

There's not normally a fixed mapping between VCPUs and PCPUs and so there's 
not a requirement that each VCPU ends up running on a separate PCPU (although 
I'd expect something close to that to happen in the case you describe, 
especially if the VCPUs were occupied with something computer intensive).

> If there is up to 32 vcpus per guest, can I exceed the number of physical
> CPUs? For example:
>
> Dom0 (4 vcpu)
> Guest1 (32 vcpu)
> Guest2 (32 vcpu)
> Guest3 (32 vcpu)
>
>  If I do that, how does Xen operate?

VCPUs are to domains as threads are to a process under Unix.  VCPUs are the 
units that get scheduled.  If you have more VCPUs in a domain than there are 
PCPUs then that's less efficient because those VCPUs will never be able to 
run in parallel.  But the scheduler can cope with it and it might be useful 
for some kind of testing, or if you migrate an SMP domain to a smaller host 
temporarily.

Cheers,
Mark

> Thank you very much for your answers.
>
> ---Kayvan



-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.