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: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Floating Processors
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 19 Apr 2007 02:48:55 +0100
Cc: Dylan Martin <dmartin@xxxxxxxxxxxx>
Delivery-date: Wed, 18 Apr 2007 18:46:04 -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
User-agent: KMail/1.9.5
> 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?

Not necessarily...

> 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 if you limited it ;-)

There are really two parameters here: how many VCPUs you give a guest, and how 
you distribute those over PCPUs (real CPUs).

If you have 4 PCPUs and you want a guest to be able to use the full processor 
bandwidth of the machine (peak) then you need to give it 4 VCPUs and set the 
scheduler parameters appropriately so that its CPU time is not capped.

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

Pinning really refers to setting the mapping of VCPUs to PCPUs manually rather 
than letting the scheduler migrate VCPUs around.  You might want to do it 
e.g. to guarantee a domain exclusive use of one processor, or you might want 
to pin two groups of domains to share disjoint sets of processors.

> 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.
>
> Ok, now that I've read my own question, I guess my real question is,
> can someone point me to a good document that descibes how Xen allocates
> available processors..?  If there isn't such a document, please take a
> shot at the question above...

The credit scheduler does it, within the constraints you provide by pinning 
using either xm or the domain's config file....


Side note: VCPU hotplug is doable (for PV domains, anyhow).  So you could 
hotplug VCPUs into a guest to let it use more PCPUs in the machine, then 
hot-remove them later when you want it to be more limited.  AFAIK the crazy 
cool SMP alternatives patch will automatically patch locking sites so that 
you don't get (very much) penalty for running an SMP-aware kernel with only 
one VCPU.  Cool stuff :-)

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

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