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

RE: [Xen-users] Xen Not Support multi-cpu??


  • To: "Peter Fastré" <peter.fastre@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Thu, 15 Mar 2007 12:16:13 +0100
  • Delivery-date: Thu, 15 Mar 2007 04:15:43 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: Acdm8dQ3FbjnKrU5TsWA+cjGXoxdFAAALy1w
  • Thread-topic: [Xen-users] Xen Not Support multi-cpu??

 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Peter Fastré
> Sent: 15 March 2007 11:05
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-users] Xen Not Support multi-cpu??
> 
> 
>       >To be VERY PEDANTIC: VCPU's are what ALL domains 
> "know". The REAL CPU's 
>       >are handled by the hypervisor only. Whilst it's true 
> that Dom0 gives the
>       >instructions about how many real and virtual CPU's a 
> guest should use,
>       >it still is the hypervisor that enforces, controls and 
> guarantees this. 
>       >
>       >Dom0 in the sense of the Hypervisor is another guest - 
> it just so
>       >happens that it's got the "privileged flag" set. Think 
> of Dom0 as a
>       >"root" user in Unix, and DomU as a "regular user", and 
> you get the idea. 
>       >
>       >
> 
> I get the idea. But I have another question about this.
> Should we compile the dom0 and domU kernels with SMP support? 
> I have bought a server with 2 5130 cpu's (quad core), which 
> make the total cpu count 8. 
> How do I have to understand the arrangement of cpu's? One cpu 
> for the dom0 (which doesn't need SMP compiled then?), and 
> some domU's with two or 3 vcpu's (heavily loaded ones -> they 
> need SMP then?) and some domU's with only 1 vcpu. 
> So is it correct to say that I need SMP only for the domU kernels?

If you want to make your own life easy, just compile one kernel for Dom0 and 
DomU with SMP enabled (which is default). 

But if you want to eek out the last couple of percent performance out of the 
kernel (assuming your apps spend a fair bit in the kernel), you may want to get 
rid of SMP for kernels that you don't run more than one VCPU on. Note that 
there should be little difference between running SMP kernel or non-SMP kernel 
on a single (V)CPU, as the locks and such will never be contended, nor will 
there be cache-flushes for the locks. But of course, there are extra 
instructions to achieve locks in SMP, which will take some extra time from the 
execution. [And some locks will still be needed, as you still have the 
possibility of multiple threads running on the same CPU interacting with each 
other]. 

Note that the number of VCPU's in a 8 core system is not limited to 8. You can 
have 8 VCPU's for every domain should you wish to (and have a hundred domains 
-> 800 VCPU's). It's just that they can't all run at once, of course!

--
Mats
> 
> Peter
> 
> 
> 
> 



_______________________________________________
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®.