TechFRP Search

Custom Search

Tuesday, September 14, 2010

Windows 7 Virtual Box 100% CPU Issue

     I've been researching an Issue that I've encountered running VirtualBox 3.2.8 in Windows 7. It may very well occur in other versions of Windows and VirtualBox but I have not tested them for the issue. What I'm encountering is the VirtualBox process on the host pegs at 100%, freezing the Guest OS permanently. The only out is to Power off the guest and restart. This only appears to happen when running 2 Virtual Guests at the same time.

     After suffering through many restarts I found in a few forum posts around the web, some hints that VirtualBox was having issues with Windows Prefetch and Superfetch. Prefetch/Superfetch are services that "Preload" portions of frequently used applications into Memory prior to your clicking the shortcut to start them. It analyzes you're computer usage and creates a record establishing the most frequently used components. These are then automatically loaded into memory in advance speeding up the load times of your applications. It actually is pretty slick and is the primary reason why Windows 7 feels faster and more responsive than previous versions of Windows. Microsoft has made great improvements to the algorithms that make up Prefetch/Superfetch for Windows 7.

     What these forum threads suggested was that the VirtualBox disk I/O to the virtual hard drive files was getting intercepted by Prefetch/Superfetch and creating a hang situation trying to read/write to the virual hard drive files. The fix suggested was to simply turn off Prefetch/Superfetch in the Registry. There are utilities out there that can do this for you but I personally haven't tested them. In order to do this you will need to make modifications to your Registry.

     At this point I will give a warning. Your Registry is your Main Database of all settings in Windows. Making incorrect modifications to it can seriously screw up you computer so always make a backup of your Registry before making changes. I repeat, backup, backup, backup. As well I personally take no responsibility if you attempt to make this change and mess up your PC.

     Well, now that being said here is what has worked for me.

To Disable Prefetch/Superfetch go to your Start button and in the Search box type "Regedit".

Go to:  HKey_Local_Machine/System/CurrentControlSet/Control/Session Manager/Memory Management/PrefetchParameters

Modify the KeyWord EnablePrefetcher and EnableSuperFetch as seen below:

                                  Click to Enlarge.

You can enter the values below as you would like.

0 = Disabled
1 = Application Only Enabled
2 = Boot Only Enabled
3 = All Enabled

I've chosen to keep the Boot Prefetch settings to help the Boot times so the example above shows the values = 2.

You can now close Regedit.

I'd recommend Rebooting your PC at this point to get a clean start.

    After this was applied, VirtualBox would still use 100% resources at times but has always returned control to the Virtual Guest OS.

Freezing has been eliminated.

No comments:

Post a Comment