This post is something like a reminder to myself. It is something I’ve found in several blog posts in the Internet but I’d like to share it as well…

Some time ago I decided to do my development in virtual machines so I could easily reinstall my boxes and/or migrate my work to another PC. I’ve tried different solutions and I decided to use Microsoft Virtual PC 2007. Unfortunately I’ve always had problems with the guest operating system being not as responsive as expected when hosted on my laptops. At first I thought it was my laptop configuration (HP Compaq nc6320) but after I bought a new one (HP Compaq 8510w) nothing changed compared to my old one. It seemed like some power management issue (it was like the processor was downclocking although the virtual machine was active) but playing with the Power Options didn’t help. My simple (but really ugly) workaround was to keep the processors busy by running some BOINC projects.

I was almost right. As pointed out in Ben Armstrong’s blog HP laptops seem to be one of those that “stop their system timers when entering low power modes” which effectively downclocks the virtual machine’s CPU - this could be easily seen with tool like CPU-Z. In this case the (temporary?) solution is to enable an idle thread of the Virtual PC process to keep the processor busy by doing some useless for the society tasks and drains your battery… In fact the solution (described in details below) is better than BOINC because Virtual PC is a single CPU process and the idle thread occupies exactly the same CPU. When using BOINC on a multi-processor (or multi-core) system however you have two options: 1. launch it on one CPU and pray it will run on the same CPU/core Virtual PC does; or 2. launch it on all available CPUs/cores and pray for  battery life. So the more environment-friendly solution is:

  1. Stop all running virtual machines and the Virtual PC Console;
  2. Locate and open your Virtual PC’s Options.xml (usually in “%AppData%\Microsoft\Virtual PC\Options.xml“) with a text/XML editor of your choice;
  3. Find the last “</virtual_network>” tag and add the following section (if missing) after it:
    <virtual_machines>
    <enable_idle_thread type=”boolean”>true</enable_idle_thread>
    </virtual_machines>
  4. Save and close the file. Launch a virtual machine.
  5. Your laptop’s fans shoud launch automatically.

I wonder if HP intend to fix this behaviour in some future BIOS updates…

Popularity: 8% [?]