Friday, 12 March 2010

VHD disk images being read while VirtualPC is not running?

I setup a Virtual PC recently and noticed my hard disks were very busy lately. My VirtualPC is not on, but checking what files were being accessed (Task Manager --> Performance --> Resource monitor) I noticed that the VHD virtual disk image was being read a lot. Which is really odd as it's not in use.

The solution was to disble the service "Superfetch". Hey presto, all is quiet again.

Superfetch was trying to keep my system running fast by pre-loading the VHD into memory. Madness.

I've had superfetch turned off all day, and my hard disks's have never been so quiet.


Now, if only there was a way to exclude folders from superfetch...
Having a Google around there's no exclusion list, however, there is a way to refine what's going on via the registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters

Modify the EnablePrefetcher key to one of the following settings:

  • Disable Caching: 0
  • Cache Applications Only: 1
  • Cache Boot Files Only: 2
  • Cache Everything (default): 3

Experiment with this key to see if caching applications or boot files rather than everything still provides enough of a performance boost without getting bogged down.