[kernel-xen] Maximum number of CPUs set into 16 (CONFIG_NR_CPUS=16) ?

Steven Haigh netwiz at crc.id.au
Fri Jan 25 10:52:06 EST 2013


On 24/01/2013 9:29 PM, Yuriy Kohut wrote:
>
> So, I'm OK with 16 cores for Dom0. But could you please confirm more the 16 could be assigned to VMs ?
>

The only figure that matters here is the figure printed in a 'xm info'. eg:

# xm info
host                   : xenhost.lan.crc.id.au
release                : 3.7.4-1.el6xen.x86_64
version                : #1 SMP Wed Jan 23 15:52:51 EST 2013
machine                : x86_64
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 3303
hw_caps                : 
bfebfbff:28100800:00000000:00003f40:179ae3bf:00000000:00000001:00000000
virt_caps              : hvm
total_memory           : 8116
free_memory            : 1346
free_cpus              : 0
xen_major              : 4
xen_minor              : 2
xen_extra              : .1
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 
hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : unavailable
xen_commandline        : dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 
dom0_vcpus_pin
cc_compiler            : gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
cc_compile_by          : mockbuild
cc_compile_domain      : crc.id.au
cc_compile_date        : Thu Jan 24 14:37:56 EST 2013
xend_config_format     : 4

Here, you're looking at the following specific parts:
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1

This shows I have 1 x CPU with 4 separate cores, 1 thread per core. This 
is the only figure that matters.

The command 'xm vcpu-list' will show you what vcpus are in use against 
which DomU/0.

You won't want Dom0 to have 16 VCPUs. This will cause a lot of overhead 
and context switching and probably decrease overall performance. For 
most cases, Dom0 should have 1-4 VCPUs pinned for Dom0 use only. Then 
limit the DomUs to use the rest of the cores.

On all my setups, I only pin a single core to Dom0, the rest are used by 
the DomUs. eg my home system:

# xm vcpu-list
Name                                ID  VCPU   CPU State   Time(s) CPU 
Affinity
Domain-0                             0     0     0   r--    4719.8 0
lamp.vm                              2     0     2   -b-     124.3 1-3
lamp.vm                              2     1     3   -b-     136.1 1-3
mail.vm                              4     0     3   -b-     161.7 1-3
mail.vm                              4     1     2   -b-      49.2 1-3
remotedesktop.vm                     5     0     3   -b-     713.3 1-3
remotedesktop.vm                     5     1     1   -b-     564.5 1-3
tsm.vm                               3     0     3   -b-      53.5 1-3
tsm.vm                               3     1     2   -b-      19.1 1-3
zeus.vm                              1     0     2   -b-     104.1 1-3
zeus.vm                              1     1     3   -b-      31.3 1-3

In this example, Dom0 only has 1 VCPU. I hope this answers your question.

-- 
Steven Haigh

Email: netwiz at crc.id.au
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4965 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.wireless.org.au/pipermail/kernel-xen/attachments/20130125/bf306d4f/attachment.p7s>


More information about the kernel-xen mailing list