Scott Hanselman

Here's a great list of tips on Optimzing Performance with Virtual PC (VPC)

February 20, 2004 Comment on this post [6] Posted in Programming
Sponsored By

Here's a great list of tips from my buddy J. Sawyer at MSFT.

Biggest perf tip is to put the VPC Virtual Hard Disks (VHD) to separate disk spindles from the operating system.  The biggest perf issue with VPC is related to disk I/O … and by making the VPC fight with your OS and swap disk make this issue much, much worse.  Additionally, today’s USB 2.0 and Firewire external hard drives run on a fast interface bus (Firewire does have some advantages over USB 2.0, but both are excellent), have a large (8MB) buffer and spin at 7200 RPM, as opposed to 4200 RPM for most laptop HDD. 

Also, note the tip below regarding “Run Virtual PC at Maximum Speed” … this will give a boost to the VPC’s thread priorities at the expense of the host OS applications.  Depending on what you are using the VPC for, this may be exactly what you want. 

From a PPT Deck:

Guidelines:

  • Ideally Virtual PC performance is at:
  • CPU: 96-97% of host
  • Network: 70-90% of host
  • Disk: 40-70% of host
    • However this is only for optimized guest operating systems running typical loads for a single process
    • The Virtual PC team’s aim is always to provide the fastest possible solution while not compromising compatibility
    • While virtual machines are not slow – there is always the potential for an unusual application to cause performance issues

Performance Tuning

  • Guest Performance – Preferences
  • Check “File … Options”
  • Running guest in background: Enable “Run Virtual PC at Maximum Speed”
  • Running a test on multiple guests: Enable “All running virtual machines get equal CPU time”
  • Memory
  • Host should have a minimum of 256MB, 512MB – 1024MB recommended
  • More memory is recommended for running multiple virtual machines simultaneously
  • Each guest should be allocated memory like it would on a physical machine
  • Virtual machines cannot use paged memory on the host system

Additional Disk Optimizations

  • Virtual Hard Disk size
  • Compress them
  • Defrag guest
  • Clear unused sectors ( Cipher, Eraser, etc.)
  • DO NOT attempt this step on a differencing drive – it will expand the disk to maximum size and you cannot compact it.
  • Compact using Virtual Disk Wizard
  • Enable NTFS compression on host operating system
  • Trades off performance for file size
  • Virtual Hard Disk performance
  • Place the .VHD files on separate spindle from host OS
  • If using Undo or Differencing Disks, place them on an additional spindle

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
February 21, 2004 3:09
The single best way I've found to accomplish the "different spindle" goal is to have them live on an external 7200 RPM USB2.0 drive. Works like a charm.
February 23, 2004 9:08
Hey.. which step do we NOT do on a differencing drive? the Use eraser step or compress via virtual disk wizard? I'm thinking eraser right?
February 23, 2004 23:11
Scott,
What a timely post. I installed VirtualPC over the weekend and start using it. I found that I need to by more RAM for the host. Otherwise it runs great.

Thanks, Maxim

[www.ipattern.com do you?]
February 26, 2004 0:51
About getting the undo data on a separate spindle... When you enable undo drives, VPC creates a .vud file with the differences. This is stored under My Documents which, by default, is on your C drive. This hurts perf quite a bit. Move My Docs to another drive.

Also, insure that hardware acceleration is cranked in the guest OS display settings.
July 14, 2004 1:47
Just wondering if anyone out there knows how to stop the time synchronization with the host OS. I need the VPC image to be running with a specific date and time and every time I change the settings the host OS time and date are pushed back to the image OS.

Thanks
January 05, 2006 7:43
Darren -

Have you tried removing the Virtual Machine Additions from your VPC? I assume that would work, since my VPC running Kubuntu Linux still has the date and time of the day I configured it. :)
Cam

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.