Wednesday, May 23, 2012

VMWare Fusion and Excessive Idle CPU Usage

I've stuck with VMWare Fusion (currently at 4.02) over the years because I find it much more stable than Parallels. However, I've noticed that my virtual machines always have rather high CPU usage under Fusion. My Windows Server 2008 R2 VM has always consumed about 40% CPU usage on the host side, even when at close to 0% CPU usage on the guest side.

This is a problem. It makes my Macbook Pro run hot and puts a serious dent in my battery life.

Things I ruled out by trial and error:

  • It's not a RAM issue - I have 16GB of RAM, 4GB of which is dedicated to the Windows VM, and I'm not seeing paging on the guest or host.
  • Removing the guest's virtual USB device is one suggested fix I've seen people offer. This seemed to improve CPU usage by several percent, but nothing significant.
  • Manually changing the virtualization engine didn't help.
  • Enabling or disabling hard disk buffering didn't help.
  • I disabled as many services as possible in the Windows 2008 R2 guess, and confirmed via Sysinternals' Process Explorer that nothing was chewing CPU or doing significant I/O in the background.
  • Enabling or disabling 3D acceleration in Fusion's virtual machine settings didn't help.
  • Enabling or disabling Aero on the guest didn't help.

In the end, you know what worked? I changed VMWare Fusion's settings for the virtual machine and reduced the number of virtual CPUs from 4 to 2. This took idle host CPU usage from ~40% down to ~20%, a figure I consider much more reasonable.

I'm not sure exactly why this worked. FWIW, this is on an early 2011 MacBook Pro with a 4-core Sandy Bridge i7 CPU. There are 4 physical cores and OSX "sees" 8 virtual cores. Therefore, my virtual machine is probably now running on a single physical core. I'm sure that has something to do with it.

No comments:

Post a Comment