Jonathan Salomon
2009-Jun-23 08:29 UTC
[Xen-users] present domU with 1 CPU with multiple cores
Hi all, 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. I want to run a couple of DomU instances on this machine. However to make sure that Dom0 will always respond even when the DomU instances have a high load, I want to keep CPU 0 available only for Dom0. Therefore in the DomU config files I''m using the following CPU definition: cpus="1-3". Does it makes sense to do this? Or would Xen handle this better on its own? Anyway, so one of the DomU instances runs software that I have bought a 1CPU license for. 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 it up I was wondering how I can tell Xen to assign say 2 cores to this DomU instance, but present it as 1 CPU with 2 cores. Also how do I see on which physical CPU a DomU instance is running? When I set cpus="1-3" and vcpus="1" , then ''xm top'' will show that the instance is running on vCPU 0 (which I assume is CPU 0 of that instance, not physical CPU0 since I deliberately pinned it to CPUs 1-3). Also ''xm list'' will show how many vCPUs that DomU runs on, but not on which physical CPU. Thanks! Best wishes, Jonathan Salomon IT Manager Panaya Inc. - Cut 50% of your SAP upgrade cost with automation software. Tel: +972 (0) 9 761 8007 Cell: +972 (0) 52 7335999 Fax: +972 (0) 9 746 7901 E-mail: jonathan@panayainc.com<mailto:jonathan@panayainc.com> Web: www.panayainc.com<http://www.panayainc.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jeff Sturm
2009-Jun-23 12:12 UTC
RE: [Xen-users] present domU with 1 CPU with multiple cores
> From: xen-users-bounces@lists.xensource.com[mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Jonathan Salomon> Sent: Tuesday, June 23, 2009 4:30 AM > To: xen-users@lists.xensource.com > Subject: [Xen-users] present domU with 1 CPU with multiple cores> However to make sure that Dom0 will always respond even when > the DomU instances have a high load, I want to keep CPU 0 available > only for Dom0. Therefore in the DomU config files I''m using thefollowing> CPU definition: cpus="1-3". Does it makes sense to do this? > Or would Xen handle this better on its own?I think it''s a good idea. If your domU load is CPU-intensive, dom0 may not need to run often. However that is often not the case, and each domU may frequently need to perform either disk or network I/O. Dom0 needs to be scheduled on an available CPU to complete that I/O, since it hosts the driver backend.> Also how do I see on which physical CPU a DomU instance is running?Take a look at "xm vcpu-list". -Jeff _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jonathan Salomon
2009-Jun-23 16:52 UTC
RE: [Xen-users] present domU with 1 CPU with multiple cores
Jeff, Thanks for your reply! Regarding the "xm vcpu-list": that''s what I was looking for (RTFM). However I still have no luck with the cpuid. 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: 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... Also I cannot find any documentation on the cpuid syntax (e.g. none in the xmdomain.cfg manpages). Could anyone point me to that or just explain it to me? Thank you very much in advance! Best wishes, Jonathan Salomon IT Manager Panaya Inc. - Cut 50% of your SAP upgrade cost with automation software. Tel: +972 (0) 9 761 8007 Cell: +972 (0) 52 7335999 Fax: +972 (0) 9 746 7901 E-mail: jonathan@panayainc.com Web: www.panayainc.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users