Wednesday, October 14, 2009 9:23 AM Mikael Sand

Optimization of Windows Virtual PC on a laptop

Windows Virtual PC (no not Microsoft Virtual PC) and I met up about the same time I installed Windows7 and also realized that the company laptop had support hardware assisted virtualization. Then I spent some time developing an image for BizTalk developers. After a while we all started noticing a “degradation in performance” or to put it bluntly; the performance was sh*t.

The problem was finding the solution since a Google search on “virtual pc bad performance” or “virtual pc slow mouse” turns up a lot of posts from people who simply needs a better computer. So I thought I would write a post that would turn up on Google when you search for the things I searched for. If you are a human reading this, you can skip to the solution at the end of the post.

When I started any image with the same settings and giving it as much resources as my laptop could spare (2,5 gb of memory), at first performance was good, but after about 10 minutes things started to slide downwards. Programs reacted slowly, graphics update was slow and things was generally miserable. At the worst point there was a clear delay for about 5 seconds from when I clicked the mouse button to when the interface responded. Of course I checked all the usual things like program priority and limiting SQL-server memory use.

These were the visible symptoms: slow interface and slow mouse.

The “invisible” was: High level CPU usage. Reaching 100% at the slightest provocation.

The solution finally turned up in this blog post. There are other posts pointing out the same thing but this post was the only one I could find that gave an explanation. Not even Virtual PC Guy’s blog said why. The solution is really simple:

  1. Turn of your virtual machine.
  2. Use Run and type “appdata”.
  3. Navigate to the Virtual PC settings file: “Local\Microsoft\Windows Virtual PC” (on Win7 using Microsoft VPC) or "Roaming\Microsoft\Virtual PC" (on Vista using Windows VPC) and open Option.xml
  4. Add this to the file after the last <virtual_network>-tag.
       <enable_idle_thread type="boolean">true</enable_idle_thread> 
  5. Save and reopen your virtual machine.

Personally I found an options-file in %appdata%\Roaming\Microsoft\Virtual PC as well and added the tag there to just to be safe. I don’t think you have to but better safe than sorry.

I used this in on Windows Virtual PC but I think it will work on Microsoft Virtual PC.

The explanation for the behaviour is the power management on the laptop. When you start your virtual machine, and start using it, the host OS thinks that it’s not very busy and turns off power to the processor to save energy (stupid I know). The host processor powers down and the guest processor gets even less time and so the guest processor is easily overloaded. The tag makes Windows Virtual PC use the host machine’s system idle thread therefore picking up the slack on the host machine processor.

Let’s hope “they” solve this in the next release.

Filed under: , ,


# re: Optimization of Window Virtual PC on a laptop

Thursday, October 15, 2009 9:55 PM by Lazze

Great post, will save my lots of time some day!

# re: Optimization of Window Virtual PC on a laptop

Thursday, November 12, 2009 11:33 PM by PavelR

Can't believe this is necessary.

Very useful post, thanks.

[I totally agree]

# re: Optimization of Window Virtual PC on a laptop

Monday, February 08, 2010 9:50 PM by Bill Cribbs

Hope this works!

1 million thanks.

My Vista OS did not have local\Microsoft\Windows Virtual PC.  Rather it was Roaming\Microsoft\Virtual PC

Just to be sure, I copied both into both roaming and local.

Of course you are right in that Vista does not have the same files in the same places. I have some (sorry) work mates that runs Vista. I will check with them for the file locations.

# re: Optimization of Windows Virtual PC on a laptop

Monday, November 15, 2010 1:09 PM by Aki

Hi There!

I got fairly same sort of symptoms than in your arcticle. Only difference is that I'm running on Virtual Guest on Hyper-V with 5GB and 2 virtual processors. Also I got very fast SSD hard disk. Furthermore my CPU's don't peak to 100% besides when some operation will take too long time to response. BizTalk Admin console, SQL Server MGmt Studio, Event Viewer, etc. don't response and all operations just get frozen for ages...

Wow you have some seriuos money to afford that! In my view, and this is purely based on personal experience, the kind of lag you describe is due to network issues.
If that's not the case then I don't know. Please try the forums at Microsoft.

So I'm wondering whether is some idle threading settings on Hyper-V as well or not?

Have you any experience of that?


# re: Optimization of Windows Virtual PC on a laptop

Monday, June 06, 2011 10:25 PM by P Thompson

Great post.  Solved my performance issues for all virtual pcs running  on my Windows 7 laptop, including Windos XP.

Virtual PC's are a viable option again