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
|