|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] present domU with 1 CPU with multiple cores
Hi Xen-devs,
I am writing you with a problem on this devel list, because I cannot find an
answer or documentation about the cpuid syntax (e.g. none in the xmdomain.cfg
manpages, Xen Wiki or xen-users list). I assume people on this list will be
able to help and I am prepared to document my findings (in the Wiki) to help
other people.
I have a machine with 2 physical CPUs with each 2 cores and as such when I do
cat /proc/cpuinfo on Dom0 it reports 4 CPUs. One of the DomU instances runs
software for which I have bought a 1CPU license. Consequently I have to set
'vcpus=1' otherwise it will tell me that I do not have a multiple CPU license.
However it is ok to have 1 CPU with multiple cores. Therefore to speed things
up I was wondering how I can tell Xen to assign say 2 cores to this DomU
instance, but present it as 1 socket CPU with 2 cores.
One of the example config files contains the following section for a one socket
8 core cpu:
# Expose to the guest multi-core cpu instead of multiple processors
# Example for intel, expose a 8-core processor :
#cpuid=['1:edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
# ebx=xxxxxxxx00010000xxxxxxxxxxxxxxxx',
# '4,0:eax=001111xxxxxxxxxxxxxxxxxxxxxxxxxx']
# - CPUID.1[EDX][HT] : Enable HT
# - CPUID.1[EBX] : Number of vcpus * 2
# - CPUID.4,0[EAX] : Number of vcpus * 2 - 1
#vcpus=8
Therefore I figured that for a single CPU with 2 cores I needed to change this
as follows (taking into account the vcpus*2 and vcpus * 2-1):
cpuid=['1:edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx,ebx=xxxxxxxx00000100xxxxxxxxxxxxxxxx','4,0:eax=000011xxxxxxxxxxxxxxxxxxxxxxxxxx']
vcpus=2
However my application still complains that 'The server has 2 CPUs, but this
product is licensed for 1'. What am I doing wrong? I have a m1.xlarge instance
on Amazon EC2, which exposes a single CPU with 4 cores to the OS and the
application eats that perfectly. So it should be possible...
Can anyone explain to me what to do and what the syntax is of the cpuid
directive? I've been reading a bit about cpuid and I understand that the edx,
ebx and eax are
Registers. But I don't understand what the 1: and the 4,0: are. Hope someone
can clarify this for me.
Thank you in advance!
Best wishes,
Jonathan Salomon
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] present domU with 1 CPU with multiple cores,
Jonathan Salomon <=
|
|
|
|
|