[libvirt] Is it possible to use more then 2 CPUs in the guest?

Hi, in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager. How can i use all four cores in the guest? Greetings

Mirko Raasch schrieb:
Hi,
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
How can i use all four cores in the guest?
Greetings
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
I will try a few installs on my Q9550 with: Win XP SP2 Win Vista Win 2k8 HPC All with 4 CPUs enabled and post the results. But i have the assumption that the qemu-cpus are recognized as physical sockets by windows xp hence only two are available. Will post back when i have results - or either of the Daniels would have an answer - but i think it is more a linux-kvm or qemu thing. Gerrit

Mirko Raasch schrieb:
Hi,
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
How can i use all four cores in the guest?
Greetings
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list As i assumed:
Windows XP SP2 only sees 2 Cores, Windows 2008 HPC sees 4 Cores. I ommited the Windows 7 Beta. The qemu-cpu counts as a socket towards Windows XP Question for the two Daniels: Is there a plan to chose a CPU type that is provided by the kvm? And would that help in the least? Gerrit.

On Wed, Aug 05, 2009 at 10:11:07AM +0200, Mirko Raasch wrote:
Hi,
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
I don't know what those apps are, but they sound broken to me. If the guest has been launched with 4 virtual CPus, the guest OS should be able to use them, regardless of what your host core/socket/thread cpu topology is. KVM/QEMU allow upto 16 virtual CPUs IIRC, and this is totally independant of how many physical CPUs you have. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 06/08/09 12:36, Daniel P. Berrange wrote:
On Wed, Aug 05, 2009 at 10:11:07AM +0200, Mirko Raasch wrote:
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
I don't know what those apps are, but they sound broken to me. If the guest has been launched with 4 virtual CPus, the guest OS should be able to use them, regardless of what your host core/socket/thread cpu topology is. KVM/QEMU allow upto 16 virtual CPUs IIRC, and this is totally independant of how many physical CPUs you have.
As other people have already said, it's a Windows licensing thing where some versions of Windows are designed to only work on a limited number of physical CPU packages. So they will run 4-way on a quad core but not on four single core CPUs. So it is seeing all the cores and reporting them in task manager but only allowing two to be used by programs. Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

On Thu, Aug 06, 2009 at 12:59:19PM +0100, Tom Hughes wrote:
On 06/08/09 12:36, Daniel P. Berrange wrote:
On Wed, Aug 05, 2009 at 10:11:07AM +0200, Mirko Raasch wrote:
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
I don't know what those apps are, but they sound broken to me. If the guest has been launched with 4 virtual CPus, the guest OS should be able to use them, regardless of what your host core/socket/thread cpu topology is. KVM/QEMU allow upto 16 virtual CPUs IIRC, and this is totally independant of how many physical CPUs you have.
As other people have already said, it's a Windows licensing thing where some versions of Windows are designed to only work on a limited number of physical CPU packages. So they will run 4-way on a quad core but not on four single core CPUs.
Oh I see what you mean, that really sucks horribly. There's no real workaround for that kind of problem at this time I'm afraid, other than to not use that version of Windows ;-) Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel P. Berrange schrieb:
On Thu, Aug 06, 2009 at 12:59:19PM +0100, Tom Hughes wrote:
On 06/08/09 12:36, Daniel P. Berrange wrote:
On Wed, Aug 05, 2009 at 10:11:07AM +0200, Mirko Raasch wrote:
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
I don't know what those apps are, but they sound broken to me. If the guest has been launched with 4 virtual CPus, the guest OS should be able to use them, regardless of what your host core/socket/thread cpu topology is. KVM/QEMU allow upto 16 virtual CPUs IIRC, and this is totally independant of how many physical CPUs you have.
As other people have already said, it's a Windows licensing thing where some versions of Windows are designed to only work on a limited number of physical CPU packages. So they will run 4-way on a quad core but not on four single core CPUs.
Oh I see what you mean, that really sucks horribly. There's no real workaround for that kind of problem at this time I'm afraid, other than to not use that version of Windows ;-)
Daniel
"that version of Windows" in a productive virtualization environment could as well be a Windows 2k3 or 2k8 Standard or Enterprise Edition run on a dual socket Nehalem Server or a beefed out Dunnignton. 16 or 24 Threads are available to the Host and could be passed on to the guest but 2k3 and 2k8 Standard only uses 4, Enterprise Edition 8 of the cores. Only the Datacenter-version is good for 32/64 sockets (32/64 bits respectively). http://www.microsoft.com/germany/windowsserver2008/editionen/spezifikationen... By the way: Isn't this an issue for the licensing terms of Red Hat Enterprise Linux? There also applies a 2 socket constraint for the Server license, only on the Advanced Plattform you could use more sockets. I could test what is detected by windows if i choose another cpu-model than "qemu" when invoking kvm. Couldn't it made possible to choose the cpu-model via libvirt? Another question (illposted here): How do i register KVM-Virtual Machines in RHN? The appear in RHN in the Virtualization-tab but can't be assigned to a channel, this only works for Xen-guests... Is there a point in the RHEL5.4 Documentation which describes this? Gerrit.

On Thu, Aug 06, 2009 at 05:53:01PM +0200, Gerrit Slomma wrote:
I could test what is detected by windows if i choose another cpu-model than "qemu" when invoking kvm. Couldn't it made possible to choose the cpu-model via libvirt?
We do have an RFE to choose the CPU model in libvirt, but that wouldn't let us specify topology, since QEMU doesn't allow that to be expressed via its -cpu arg at this time. I've just been pointed to this proposed enhancement to QEMU for choosing topology: http://patchwork.kernel.org/patch/33961/ That discussion is still ongoing, but once its settled we'll be able to look at supporting it in libvirt too. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel P. Berrange schrieb:
On Thu, Aug 06, 2009 at 05:53:01PM +0200, Gerrit Slomma wrote:
I could test what is detected by windows if i choose another cpu-model than "qemu" when invoking kvm. Couldn't it made possible to choose the cpu-model via libvirt?
We do have an RFE to choose the CPU model in libvirt, but that wouldn't let us specify topology, since QEMU doesn't allow that to be expressed via its -cpu arg at this time.
I've just been pointed to this proposed enhancement to QEMU for choosing topology:
http://patchwork.kernel.org/patch/33961/
That discussion is still ongoing, but once its settled we'll be able to look at supporting it in libvirt too.
Daniel
It seems, that qemu is the "problem". I bought a quad core cpu in the hope, i can use all four cores, but only 2 of them in the host are under full load if i heat up all cpus in the guest with prime95, superpi or some other programs. Greetings

Tom Hughes schrieb:
On 06/08/09 12:36, Daniel P. Berrange wrote:
On Wed, Aug 05, 2009 at 10:11:07AM +0200, Mirko Raasch wrote:
in my server i use an Intel Quad Core CPU and i want to use in one WindowsXP guest all 4 cores. The device manager shows four CPU (Qemu Virtual CPU version 0.10.5). When i start prime95 or superpi, only 2 of them are in use. CPU-Z shows also 2 Cores, instead of 4 like the device manager.
I don't know what those apps are, but they sound broken to me. If the guest has been launched with 4 virtual CPus, the guest OS should be able to use them, regardless of what your host core/socket/thread cpu topology is. KVM/QEMU allow upto 16 virtual CPUs IIRC, and this is totally independant of how many physical CPUs you have.
As other people have already said, it's a Windows licensing thing where some versions of Windows are designed to only work on a limited number of physical CPU packages. So they will run 4-way on a quad core but not on four single core CPUs.
So it is seeing all the cores and reporting them in task manager but only allowing two to be used by programs.
Tom
I tried Windows 7 Ultimate and its the same like in WinXP, only two Cores are in use. The other two cores are bored. It does not matter whether I emulate four, six or eight cpu in the guest, in the host only two of four cores are in use.

Mirko Raasch schrieb
I tried Windows 7 Ultimate and its the same like in WinXP, only two Cores are in use. The other two cores are bored. It does not matter whether I emulate four, six or eight cpu in the guest, in the host only two of four cores are in use.
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
As stated: Try Windows 2k3 or 2k8 Server Standard. The problem is in qemu/kvm since all cpus are treated as a socket. Gerrit
participants (4)
-
Daniel P. Berrange
-
Gerrit Slomma
-
Mirko Raasch
-
Tom Hughes