Google
 

Thursday, July 31, 2008

The Sean Blog : Virtual PC 2007 Released!

Sean's tips on VPC performance:

Now, in order to set this post aside from some of the other "Virtual PC 2007 has been released!" postings, I thought I would share some best practices relating to the usage of Virtual PC that I have picked up from doing demos over the last year or so (as well as from an internal demo optimization doc that made its way into my inbox a few months ago):

  1. I'll start with the obvious… the more RAM the better. You need to have enough RAM to run your host operating system, your guest operating system(s), plus an additional 32MB of overhead for each guest OS that you will be running. From my personal experience, 2GB of RAM is a good starting point.
  2. A CLOSE second to RAM is your hard drive configuration. If you are running your Host OS and Virtual machines from the same hard drive, you are in for a painful experience. For good performance you will want to move the .vhd files off to the fastest secondary hard drive possible. For a secondary internal hard drive, SATA or SCSI is ideal, and for an external HD, pick up an eSATA drive. This advice is even more important if your computer is a laptop, as they often have slow 4200 RPM hard drives that will struggle with the concurrent I/O load.
  3. If your Antivirus allows you to exclude files or directories from realtime scans, exclude the directory that holds your images (and/or exclude the following extentions: .vhd .vud .vsv .vfd .vmc)
  4. Keep the host computer hard drives defragmented.
  5. The smaller (or less fragmented) the VHD files the faster. Steps to shrink/defragment:

    1. In the VM run defrag (a couple of times). It might take a while (up to hours) but it is worth waiting for
    2. Run the VM precompactor – this is an ISO image. Just attach it to the VM . The precompactor will zero all the unneeded space in the VHD

      1. Load the 'Virtual Disk Pre-Compactor.iso' from the Virtual Machine Additions Directory
      2. Answer 'Yes' to start the zeroing
      3. Shutdown the VPC when done
      4. Use Virtual PC Disk Wizard to edit and compact the pre-compacted .vhd
  6. Use a processor with Virtualization Technology (Intel Page, AMD Page). This is any reasonably recent processor. This will greatly speed up the OS boot time, OS installation time, and performance in non-Windows operating systems (as well as Windows installations that to not have the Virtual PC Additions loaded). On guest Windows installations that have the Virtual PC Additions loaded, performance is significantly enhanced), which brings us to:
  7. Load the Virtual PC Additions. These are included with Virtual PC, and will need to be loaded in the Guest operating system. This will load up drivers for the virtualized hardware, allow for folder sharing (with the host OS), drag-and-drop functionality (from the host OS), synchronize time with the host OS, and generally turn on "Teh Snappy"
  8. Start up Virtual PC with the following option (Best way is to create a shortcut on your desktop): -usehostdiskcache From the command line reference:

    Turns on host-side disk caching, which can improve performance of virtual machines running operating systems other than Windows. This parameter can be useful for resolving poor performance problems with disk intensive tasks. This parameter can be used only when starting Virtual PC.

  9. Do NOT use the /3GB switch on your Host machine. That switch increases the user memory space at the expense of Kernel space. Virtual machines use more kernel memory than user memory – so enabling this switch on the host will decrease the amount of virtual machines that you can launch
  10. I'll leave you with a tip that would seem to defy logic (and which I have not tried myself), but the word on the street is that you can increase performance by enabling NTFS compression on the directory that holds your Virtual PC image files (.vmc, .vud and .vhd). It seems that writing a big chunk to disk is slower than first compressing the chunk and then write it to disk.

The Sean Blog : Virtual PC 2007 Released!

No comments: