WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Looking for clarity about physical cores/cpus and VCPUs
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 25 Jan 2008 00:45:20 +0000
Cc: Kayvan Sylvan <kayvan@xxxxxxxxx>
Delivery-date: Thu, 24 Jan 2008 16:46:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <DF0031A8C0149E41802BAFD18D6C4B701294E636D3@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <DF0031A8C0149E41802BAFD18D6C4B701294E636D3@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
> 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

<Prev in Thread] Current Thread [Next in Thread>