Saturday, September 22, 2007

The Great Virtual PC 2007 CPU Gobble!

One of the unexpected side effects of moving from Virtual PC 2007 to Virtual Server as development and testing environment is lower CPU utilization. For some reason, when I load up a test scenario (two client VMs collecting data and uploading to a single server VM) in Virtual PC 2007, the virtualpc32.exe process hosting the scenario chews-up 50% or more of the available CPU cycles on my dual-core workstation. By contrast, when I load up the same scenario under Virtual Server, the VMs chew-up almost no CPU, which is what I would have expected given that the workloads running within them are very light (i.e. Task Manager inside the Guest OS sessions shows nearly zero CPU utilization).

I'm going to forward my findings to Ben Armstrong (i.e. the "Virtual PC Guy" at Microsoft) for analysis, however, I already have a theory on the source of the excessive CPU utilization. For starters, it seems isolated the client VMs, both of which are running a high-resolution monitoring agent (DMS Clarity Metrics Tracker). This agent makes frequent calls to PDH, WMI and the Registry, and I'm guessing that Virtual PC 2007 is generating a lot more overhead when processing these calls than Virtual Server. The agent also uses a set of high-resolution timer objects that likewise seems to give Virtual PC fits.

As a simple test, I tried disabling the agents on each VM. CPU utilization for virtualpc32.exe immediately to dropped to below 10%. Case closed.

Bottom Line: For testing applications that use high-resolution timers, or that make frequent calls to certain system libraries, Virtual Server 2005 R2 SP1 does a much better job of handling what should normally be a very fast, lightweight operation. And with VMRC Plus, you don't have to sacrifice usability in order to reap the rewards of better real-time application support under Virtual Server.


Anonymous said...


I am currently experiencing the same issue. I have Virtual PC 2007 running two Guests. Initially, everything was running reasonably well. But suddenly, CPU usage is at 100% almost 95% of the time. VERY Slow to do anything. What baffles me is that it worked well for 2-3 weeks. Then suddenly, the CPU usage increased, with no real change in what the Host or Guests are processing.

How can I track this down and fix this?

Akil Franklin said...

I can vouch also that this is a problem. On a dual core machine, the VPC only uses a single core and that core is completely chewed up (@ 100%) the entire time the VPC is running. I've atcually had to switch to VMWare as a result.

Dapo Onawole said...

Is there any update about this. Having this problem and it's quite frustrating even though host machine has a dual core, only one of the CPU gets flogged by VPC 2007...

Not fair :). In my own case, Vmware is not an option because I hate to duplicate applications in my development environment. That's costly too.

Anonymous said...

Similar problem. Just using a Win98SE ISO startup image and the CPU load is a steady 50%. I'm using an Intel Core2 Duo at 2.66 GHz. This load is unsustainable.