David Levinger
2008-Apr-19 17:40 UTC
[Fedora-xen] Unable to use multiple CPUs inside an HVM
Hey Guys, I have a fully virtualized XP guest that is set to have 2 VCPUs and in the guest I see 2 CPUs but when it is under heavy load it only utilizes 1 of the physical cores. Both xm and virsh show that the guest only has 1 CPU, but my config file and the guest show it should have 2. What am I missing? How can I get this guest to have access to both cores? Thanks! David
Alroger L. Gomes F.
2008-Apr-20 16:36 UTC
Re: [Fedora-xen] Unable to use multiple CPUs inside an HVM
I have noticed that too. David Levinger wrote:> > Hey Guys, > > I have a fully virtualized XP guest that is set to have 2 VCPUs and in > the guest I see 2 CPUs but when it is under heavy load it only > utilizes 1 of the physical cores. > > Both xm and virsh show that the guest only has 1 CPU, but my config > file and the guest show it should have 2. > > What am I missing? How can I get this guest to have access to both cores? > > Thanks! > > David >-- Alroger Luiz Gomes Filho SDEV - Smart Developments http://www.sdev.com http://cafe-ti.blog.br So little time, so many systems . . .
Andrew Cathrow
2008-Apr-20 18:11 UTC
Re: [Fedora-xen] Unable to use multiple CPUs inside an HVM
When Windows installed selects the HAL library appropriate the the hardware. If you install on a single CPU system then the uniprocessor HAL is installed. If you then add a second vcpu to the guest then the windows HAL won''t see it. You''ll need to replace Window''s hal. See links below for some background. I don''t think there is a Microsoft *supported* way to do this but I''ve done this a number of times without issue on XP and 2000, but I''ve not tried this on 2003, 2008 or Vista http://support.microsoft.com/kb/309283/en-us http://support.microsoft.com/default.aspx?scid=kb;EN-US;237556 On Sat, 2008-04-19 at 10:40 -0700, David Levinger wrote:> Hey Guys, > > I have a fully virtualized XP guest that is set to have 2 VCPUs and in > the guest I see 2 CPUs but when it is under heavy load it only > utilizes 1 of the physical cores. > > Both xm and virsh show that the guest only has 1 CPU, but my config > file and the guest show it should have 2. > > What am I missing? How can I get this guest to have access to both > cores? > > Thanks! > > David > > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen
David Levinger
2008-Apr-21 23:05 UTC
RE: [Fedora-xen] Unable to use multiple CPUs inside an HVM
You were 100% correct Andrew. The problem was with how I configured XP, though I seriously thought I knew better. I sysprepped my image and redid it with the "multi-processor" hal and voila I now see and utilize both cores. The odd part, however, is that the time required to complete a processor intensive operation seems to remain almost the same. Instead of using 50% of the available host CPU it now using 100% but estimates only a tem minute savings in processing time. Whaaaaat? I still feel like I''m missing something rather important, but at least both CPUs are now available for use. d _____ From: Andrew Cathrow [mailto:acathrow@redhat.com] Sent: Sunday, April 20, 2008 11:12 AM To: David Levinger Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Unable to use multiple CPUs inside an HVM When Windows installed selects the HAL library appropriate the the hardware. If you install on a single CPU system then the uniprocessor HAL is installed. If you then add a second vcpu to the guest then the windows HAL won''t see it. You''ll need to replace Window''s hal. See links below for some background. I don''t think there is a Microsoft *supported* way to do this but I''ve done this a number of times without issue on XP and 2000, but I''ve not tried this on 2003, 2008 or Vista http://support.microsoft.com/kb/309283/en-us http://support.microsoft.com/default.aspx?scid=kb;EN-US;237556 On Sat, 2008-04-19 at 10:40 -0700, David Levinger wrote: Hey Guys, I have a fully virtualized XP guest that is set to have 2 VCPUs and in the guest I see 2 CPUs but when it is under heavy load it only utilizes 1 of the physical cores. Both xm and virsh show that the guest only has 1 CPU, but my config file and the guest show it should have 2. What am I missing? How can I get this guest to have access to both cores? Thanks! David -- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
David Levinger
2008-Apr-22 17:03 UTC
RE: [Fedora-xen] Unable to use multiple CPUs inside an HVM
To add a couple more data points to this, if I look in virt-manager it shows at 97-99% CPU usage, but if I look at the virsh vcpuinfo domain then it shows that only one processor seems to be doing anything at a time. IE one will show blocked and the other running, or one will show offline and the other running and sometimes running and "no state". Considering the rather poor performance I''m assuming that I''m really only utilizing one at a time. Any thoughts? d _____ From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of David Levinger Sent: Monday, April 21, 2008 4:06 PM To: acathrow@redhat.com Cc: fedora-xen@redhat.com Subject: RE: [Fedora-xen] Unable to use multiple CPUs inside an HVM You were 100% correct Andrew. The problem was with how I configured XP, though I seriously thought I knew better. I sysprepped my image and redid it with the "multi-processor" hal and voila I now see and utilize both cores. The odd part, however, is that the time required to complete a processor intensive operation seems to remain almost the same. Instead of using 50% of the available host CPU it now using 100% but estimates only a tem minute savings in processing time. Whaaaaat? I still feel like I''m missing something rather important, but at least both CPUs are now available for use. d _____ From: Andrew Cathrow [mailto:acathrow@redhat.com] Sent: Sunday, April 20, 2008 11:12 AM To: David Levinger Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Unable to use multiple CPUs inside an HVM When Windows installed selects the HAL library appropriate the the hardware. If you install on a single CPU system then the uniprocessor HAL is installed. If you then add a second vcpu to the guest then the windows HAL won''t see it. You''ll need to replace Window''s hal. See links below for some background. I don''t think there is a Microsoft *supported* way to do this but I''ve done this a number of times without issue on XP and 2000, but I''ve not tried this on 2003, 2008 or Vista http://support.microsoft.com/kb/309283/en-us http://support.microsoft.com/default.aspx?scid=kb;EN-US;237556 On Sat, 2008-04-19 at 10:40 -0700, David Levinger wrote: Hey Guys, I have a fully virtualized XP guest that is set to have 2 VCPUs and in the guest I see 2 CPUs but when it is under heavy load it only utilizes 1 of the physical cores. Both xm and virsh show that the guest only has 1 CPU, but my config file and the guest show it should have 2. What am I missing? How can I get this guest to have access to both cores? Thanks! David -- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
Richard W.M. Jones
2008-Apr-23 12:10 UTC
Re: [Fedora-xen] Unable to use multiple CPUs inside an HVM
On Tue, Apr 22, 2008 at 10:03:08AM -0700, David Levinger wrote:> To add a couple more data points to this, if I look in virt-manager it > shows at 97-99% CPU usage, but if I look at the virsh vcpuinfo domain then > it shows that only one processor seems to be doing anything at a time. > > IE one will show blocked and the other running, or one will show offline > and the other running and sometimes running and "no state". Considering > the rather poor performance I''m assuming that I''m really only utilizing > one at a time. Any thoughts?Use virt-top. It''s able to tell you which physical CPUs are being utilized. You can also try using virsh vcpupin to pin virtual CPUs to physical CPUs in case there''s some contention (but use virt-top first to find out). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is ''top'' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top