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] Question on CPU usage

To: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Question on CPU usage
From: Tim Post <echo@xxxxxxxxxxxx>
Date: Sat, 22 Nov 2008 10:07:52 +0800
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 21 Nov 2008 18:08:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <a06240811c54c9745e81c@xxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <a06240811c54c9745e81c@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: echo@xxxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Simon,

On Fri, 2008-11-21 at 16:54 +0000, Simon Hobson wrote:
> I have looked but not found anything in the docs - if I've been blind 
> then just say so and point me at the right place !
> 
> 
> If I have a 4 core machine, and run 5 Dom-Us, each configured to use 
> one processor, how does Xen manage Dom-processor mapping ?
> 
> Does it dynamically assign Dom-Us to processors based on current load ?
> 
> Or is the assignment static and dependent on what order they are 
> started up ? Eg, the first three will get a core each, but the last 2 
> will share one - or some variation.
> 
> And does this change if one or more Dom-Us are configured to use 2 processors 
> ?

The default credit scheduler settings give equal share to all assigned
vcpus across all available physical cores. For instance, if you look at
the output of xm vcpu-list , you'll see the arrangements that Xen made.

There are many more granular controls available to you via the credit
scheduler, such as weights and caps per guest. The logic is very
straight forward, this page should give you all the information needed
to understand it:

http://wiki.xensource.com/xenwiki/CreditScheduler

You also have the option to pin a guest on a specific physical core, or
specify the physical cores that the guest will use. I.e. :

# List of which CPUS this domain is allowed to use, default Xen picks
#cpus = ""         # leave to Xen to pick
#cpus = "0"        # all vcpus run on CPU0
#cpus = "0-3,5,^1" # run on cpus 0,2,3,5 , but not 1

You can also use the xm vcpu-pin command to tweak as needed:

Usage: xm vcpu-pin <Domain> <VCPU|all> <CPUs|all>

Many hosts that I work with use these tools to help guarantee quality of
service for 'vip' customers, or to help control others that tend to
become CPU hogs.

I have not found any tools or control panels that are 'smart' in this
regard, i.e. setting these values according to the role that the guest
will serve. A MySQL server warrants more than a DNS server, for
instance. Most people seem to do rather well with the default equal
share.

Cheers,
--Tim


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

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