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

[Xen-users] Re: Dom0 CPU?

To: Shaun <mailinglists@xxxxxxxxxxxxxxxx>
Subject: [Xen-users] Re: Dom0 CPU?
From: Sean Dague <japh@xxxxxxxxxx>
Date: Wed, 22 Feb 2006 17:54:47 -0500
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 22 Feb 2006 22:55:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <dtipaf$j48$1@xxxxxxxxxxxxx>
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>
Mail-followup-to: Shaun <mailinglists@xxxxxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
References: <dtipaf$j48$1@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Wed, Feb 22, 2006 at 02:41:22PM -0800, Shaun wrote:
> The manual states the following
> 
> `If you are running IO intensive tasks, its typically better to dedicate 
> either a hyperthread or whole core to running domain 0, and hence pin other 
> domains so that they can't use CPU 0`
> 
> Right now I have a host that has 4 procs (dual xeon, with HT) and dom0 us 
> showing all 4 procs.  

Well, you have 2 procs with HT, which is different from 4 real procs.

> Since IO is whats thrashed first on these things (at 
> least with in my env) i would like to dedicated 1 logical proc to dom0 and 
> have the guests use the other 3.  First question is how can i tell dom0 to 
> not use all 4 procs?  I have tryed vcpu-set 0 0 but that didnt change 
> anything.  I could vcpu-pin cpu 0-3 to cpu0 but that seams like a bad idea 
> because now dom0 thinks it has 4 cpu's but actually it's 1.
> 
> [root@localhost bin]# xm vcpu-list
> Name                              ID  VCPU  CPU  State  Time(s)  CPU 
> Affinity
> Domain-0                           0     0    0   -b-    2771.4  any cpu
> Domain-0                           0     1    1   -b-    2837.8  any cpu
> Domain-0                           0     2    2   -b-    2159.9  any cpu
> Domain-0                           0     3    3   r--    2283.8  any cpu
> 
> So first question is, how can i get dom0 to stop using all 4 procs and to 
> only use 1?  

set max_cpu=1 on the Dom0 kernel boot line.

> Second whats the best way to have guests use the rest of the 
> cpu?  Do i need to write a script that runs through each guest settting it 
> manually to 1, 2, or 3?

Manual script is probably needed.

> Another question, i started up 20 guests and all guests uses cpu 1 or 3, 
> none of them used 0 or 2.  Why?

Because xen is aware enough to know that HTs aren't real CPUs, and you'll
actually get very bad performance running unrelated domains on competing HT
on the same CPU (this was found by trial and error).  Thus it is allocating
to CPU1 because it assumes Dom0 gets the dedicated CPU0 HT, and CPU3 just to
keep anything off the other HT on the second real proc.

        -Sean

-- 
Sean Dague
IBM Linux Technology Center                     email: japh@xxxxxxxxxx
Open Hypervisor Team                           alt: sldague@xxxxxxxxxx

Attachment: pgpND3nR60sw8.pgp
Description: PGP signature

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