VMware Communities
eliteweb
Contributor
Contributor

slow performance using 2 cpu

I have a MacPro Quad 3.0 with 10GB of RAM and 3TB of hard drive space. I installed Windows XP with 2GB of RAM in Fusion. When I set it to use 2 CPUs, it lags pretty bad in Windows. Selecting different programs, going to different tabs in windows explorer, etc.

When I set it back to use 1 cpu, everything works great. Snappy, and quick performance. Can anybody tell me why it suffers in performance with 2 CPUs? Is there something I am doing wrong here?

0 Kudos
27 Replies
nærd
Contributor
Contributor

Please note, this is only a qualified guess. For the time being, I can´t test it.

The issue is most likely related to the HAL (hardware abstraction layer) and some oher files, such as the kernerl, chosen during setup.

Could you start up your VM with a single processor, the take a look at your computer in the Windows Device Manager (Start, Run, devmgmt.msc). if I´m right, you should see: ACPI Uniprocessor PC.

Then do the same thing with 2 virtual processors. My guess is that you still see ACPI Uniprocessor. In order to take advantage of more cores or more processsors, you´ll need to have installed ACPI Multiprocessor PC.

This document, which BTW is excellent, states:

http://communities.vmware.com/docs/DOC-2523

Many operating systems have different kernels or hardware abstraction layers (HALs) depending on how many cores they detect at runtime. Changing the number of virtual processors after installation may not trigger a change of the kernel/HAL. One notable example of this is Windows XP, and Microsoft does not support changing the HAL without a complete reinstall (it's unofficially possible). Therefore, it's better to choose the appropriate number of virtual processors before installing the guest.

So, in order to troubleshot, I would follow the above advice and do a new install of XP.

There are however two things that puzzle me:

1) on physical machines you won´t notice a slowdown when changing from one to two processors. The only issue would be, that XP wouldn´t notice the second processor.

2) XP might detect the second processor. See:

http://support.microsoft.com/kb/309283

On Windows XP and later versions, the ACPI Uniprocessor HAL and the MPS Uniprocessor HAL recognize the existence of more than one processor and report the MP ID. Plug and Play detects that the computer devnode's hardware ID list has changed and moves the devnode back through the "found new hardware" detection process. Therefore, when you add a second processor, the MP files (HAL and kernels) are automatically installed, and you do not have to manually update the driver in Device Manager.

Perhaps, theses issues are more related to how VMware handle things, than to MS.

0 Kudos
eliteweb
Contributor
Contributor

Before I enabled the 2nd CPU after the install. I thought that would be the problem. So I followed the instructions in your post to correctly install Windows XP with 2 CPUs from the start. After the install I noticed the same performance issues. Internet Explorer lags between switching tabs. It lags when I select one program to the next. Couldn't explain it.

So I went ahead and enabled 1 CPU and to my luck everything was working great. Snappy, no lag at all. So it must be a bug of some sort with Fusion. Too bad I have no more technical support incidents or else I would raise this issue with VMWARE. Oh well I guess I am stuck with 1 CPU.

0 Kudos
AWo
Immortal
Immortal

Again, just a guess, as I'm not a MAC expert....

Does you MAC have two physical processors? It is recommended to have two times the amount of physical CPU's than you grant vCPU's to your guest's (at least with the other VMware products). The reason is the symmetric multiprocessoring. It needs to have both CPU's in sync before it can continue work. When you "only" have two physical CPU's and grant two vCPU's VMware has to wait until all other processes (which run in competition) are off the CPU. That lead's to delays in scheduling.

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
WoodyZ
Immortal
Immortal

Again, just a guess, as I'm not a MAC expert....

Does you MAC have two physical processors? The OP stated "I have a MacPro Quad 3.0" which means 4 vCPU and you don't need to be a Mac Expert to figure that out. Smiley Happy

Message was edited by: WoodyZ

Left the v off of CPU

0 Kudos
AWo
Immortal
Immortal

Because of the "Quad" in the name? Like Quad-Core? Which means ONE processor with four cores in the intel-world? Which means ONE CPU for VMware SMP? I guess you need at least to know how Apples naming scheme is like. And, sorry, I even don't know this

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
WoodyZ
Immortal
Immortal

If "it is recommended to have two times the amount of physical CPU's than you grant vCPU's to your guest's" that is the case then it does not make sense to allow more then one vCPU in a Fusion Virtual Machine as no Apple Product at the present time could meet that recommendation. Although my understanding might be wrong, I understand as long as you have 4 or more Cores one should be able to use 2 vCPUs better then on a Core2 Duo as the rest of the later version of Apples products have. Although I guess it all depends on how VMware has coded it and like much of the nonexistent documentation it very hard sometimes to get the facts.

0 Kudos
AWo
Immortal
Immortal

From the intel world VMware counts sockets (physical CPU's) not cores. There are several threads regarding this issue around here which states that you should have more (ideal 2x) the numer of vCPU's than you assign to the guest's (I even found this in a VMware presentation for ESX). The question if four cores are counted as four CPU's was answered with no. There's also a troubleshooting document from VMworld 2005 available at VMWare which states this.

In ESX 3.5 perfomance best practices you can find this statement:

"In ESX we try to co-schedule the multiple VCPUs of an SMP virtual machine. That

is, we try to run them together in parallel as much as possible. Having unused

VCPUs imposes scheduling constraints on the VCPU that is actually being used

and can degrade its performance."

This states, if you use a uniprocessoir application, using more than one CPU may cause performance degration because ESX still tries to co-schedule the vCPU's (=pCPU's).

But again, I don't know how this is handled in the MAC world. That's why i stated it is just a guess....

Some links:

http://www.vmware.com/pdf/vsmp_best_practices.pdf

This one is with a comment from a VMware guy to four-core MAC computers:

http://communities.vmware.com/thread/77107;jsessionid=529B2F29D693801B7EBD0EC6EC2F35BA?tstart=1

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
eliteweb
Contributor
Contributor

I have (2) physical CPUs that are Dual Core each running at 3.0Ghz. So I have 4 cores.

0 Kudos
eliteweb
Contributor
Contributor

I am running a single vCPU now so all is good. I can't give it 2 vCPUs. So for all of you out there who have Dual Cores, Quad Cores, and even 8 Cores. Forget about assigning 2 vCPUs to your guest. It will degrade performance. So don't buy Fusion over Parallels thinking you will get better performance just because Fusion claims it supports multi-cpus!

0 Kudos
WoodyZ
Immortal
Immortal

AWo thanks for the additional info and references and I want to clarify my previous statement "although I guess it all depends on how VMware has coded it and like much of the nonexistent documentation it very hard sometimes to get the facts." in that VMware Documentation on VMware Fusion which is the Forum and Product of focus, not ESX and ESX related documentation, is very scant and as far as technical documentation on the Fusion product well features like this of the subject should be throughly covered in the Fusion Documentation and not have to rely of bits and pieces strewn about in various forums and other places.

When th extent of the Help File information is little more then the following something is just not right!...

Setting the Number of Virtual Processors

You can set the number of virtual processors (1 or 2) available to the virtual machine.

To set the number of virtual processors

1 Open the virtual machine without powering it on.

See To open a virtual machine without powering on. If the virtual machine is already powered on or suspended, power it off. You cannot change the number of virtual processors while the virtual machine is powered on or suspended.

2 Open the virtual machine Settings sheet: choose Virtual Machine > Settings or click the Settings button in the toolbar.

3 In the Virtual Machine Settings sheet, in the System Hardware section, select Processors.

4 Select the number of processors for the virtual machine.

5 Click Apply.

0 Kudos
eliteweb
Contributor
Contributor

I know how to set multiple processors. I even did a clean install with multiple processors enabled. It still had problems. All I know is 4 cores on a Mac Pro cannot run Fusion in mult-vCPU mode.

0 Kudos
WoodyZ
Immortal
Immortal

I know how to set multiple processors. I even did a clean install with multiple processors enabled. It still had problems. All I know is 4 cores on a Mac Pro cannot run Fusion in mult-vCPU mode.

I know you know how to and that post was not a reply to one of your posts it was to AWo post and meant only as an example of the the lack of technical documentation on Fusion features within its help file or other Fusion specific documentation at the Fusion Documentation web link.

Message was edited by: WoodyZ

Note: This Message Board is threaded and not all post in a thread are a direct reply to the OP's post and or additional replies.

0 Kudos
admin
Immortal
Immortal

"In ESX we try to co-schedule the multiple VCPUs of an SMP virtual machine...."

This doesn't apply to Fusion, we're at the mercy of the OS X scheduler, which doesn't provide a way to do scheduling like this.

0 Kudos
webfrasse
Enthusiast
Enthusiast

Why do you want to have 2 vCPU's? It will not increase performance. It's virtual CPU's as in virtual performance...no real performance.

I have a bunch of Dell 2950 servers (with dual quad core CPU's) here at work. All of them run 64 bit linux and VMware Server (also 64 bit). Each server has a different number of VM guests. At no point have I seen a performance boost by enabling 2 vCPU's on these guests. My best guess is that this is interesting for a developer that want to test his/hers application and how it works in a multicpu env. and being able to do this in a VM.

/Mikael

0 Kudos
eliteweb
Contributor
Contributor

Its just VMWare marketed Fusion for having multi-CPU support. So for end users like me, it sounds like having a dual core laptop or at least this kind of performance. I am a power user so I usually have about 10 web pages open, outlook, 4 web IM clients going, real time antivirus, CRM software, Quickbooks, photoshop, excel, word, acrobat, all going at once. So I figured having 2 vCPUs would increase performance. But it does not. Actually 1 vCPU is handling everything quite well. I was just a little disappointed because I only bought fusion for the 2 vCPU feature over Parallels. Now the only other thing I cannot stand is the copy-paste ability with control-C and control-V. It is a hit and miss.

0 Kudos
webfrasse
Enthusiast
Enthusiast

Well, marketing and reality is rarely the same;-)

If it's any consolation...I have both Parallels and Fusion (Mac user at home, Windows and Linux at work) and the later is far better from a performance perspective. A lot less overhead in running a VM. Parallels eats CPU cycles even when the guest isn't doing anything at all. Not even a logged in user and you still see sometimes 15% CPU usage on the host.

/Mikael

0 Kudos
WoodyZ
Immortal
Immortal

I was just a little disappointed because I only bought fusion for the 2 vCPU feature over Parallels.

I know this doesn't help you now and I'm going to mention it for others that might read this thread. VMware provides a Free 30-Day Trial License to a fully function product to evaluate it for ones needs prior to purchasing Fusion to be sure it meets ones needs.

0 Kudos
eliteweb
Contributor
Contributor

Im not complaining, it runs fine with 1 vCPU. I just didn't understand why it sucked in performance when 2 vCPUs were enabled.

0 Kudos
AWo
Immortal
Immortal

Aha,...

... thanks WoodyZ, etung.

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos