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] Xen Not Support multi-cpu??

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Xen Not Support multi-cpu??
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 16 Mar 2007 02:16:36 +0000
Cc: Peter Fastré <peter.fastre@xxxxxxxxx>, "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Delivery-date: Thu, 15 Mar 2007 19:14:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1A8F@xxxxxxxxxxxxxxxxx>
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: <907625E08839C4409CE5768403633E0B018E1A8F@xxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
> > 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].

Does dom0 have to be SMP capable?  It used to be at one stage, but I might be 
massively out of date here.

If the "SMP alternatives" mode is compiled in the kernel will automatically 
reoptimise itself (even at runtime, last time I saw the patch!) for the 
number of (V)CPUs it has.  So the overhead of having SMP support compiled 
into a UP guest can actually be quite a bit lower than one would usually 
expect.

This is still marked experimental, I think.

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

You could even have more than that - number of VCPUs for a domU can exceed the 
number of host CPUs (although that's obviously probably not going useful from 
a performance PoV!  Might be good for testing ... something, though.).

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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