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] Floating Processors

To: Dylan Martin <dmartin@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Floating Processors
From: "Luke S. Crawford" <lsc@xxxxxxxxx>
Date: Thu, 19 Apr 2007 14:41:30 -0700 (PDT)
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 19 Apr 2007 14:40:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070418195352.GL6566@xxxxxxxxxxxx>
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: <20070418195352.GL6566@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 18 Apr 2007, Dylan Martin wrote:
If the CPUs are "floating" as opposed to "pinned", it's possible for a
busy VM to use all the available processors if the other VMs are idle,
right?

No.

this "sharing all cpu" you describe is only possible if all physical cpus are mapped into all domains:

e.g. on a 4CPU box, on each DomU, you need to add vcpus=4 to your Dom0 config file.

E.G., if I have 4 CPUs and 3 VMs and none of my CPUs are pinned, and
one of my VMs is compiling a kernel while the other two are idle, the
busy kernel-compiling VM will use all 4 CPUs, right?  It won't be
limted to only 2 or something, right?

depends on the vcpus= value in your xm config file; by default each domain is limited to 1 vcpu (which is mapped to 1 and only 1 physical cpu) this means if you have one busy domain and 8 idle domains on a 8 core box, one cpu will be pegged, and the other 7 will be idle.

I'm curious because I've noticed a few people and documents mention
pinning one cpu to each VM.

I assume is is because they don't want a situation where a
low-priority but high-processor-usage task on one VM causes another VM
with a sporadic but high-priority job to hang out waiting for the
low-prioroty job to finish.

That problem can be solved by weighting; I believe the point of pinning one cpu to one and only one DomU is to minimize context switching; obviously, when one DomU is done with a cpu and the next is scheduled to run, the registers and such need to be saved and restored to the state that the next domain expects. this costs time, and is not required if you have a 1:1 pcpu:vcpu ratio.


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

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