Andrew Connell [MVP MOSS]
1418 Posts |  40 Articles |  3755 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

In my last article on virtualization with Microsoft's Virtual PC 2004 SP1, I covered how you can use Differencing Disks to your advantage. However, in retrospect, this article was posted a bit out of order. The article below should have been posted first. Before you start building out your Virtual PC's, you should first be aware of how to squeeze out every last drop of performance. After all you're running a machine within a machine, so it's going to be a bit slower than the host, and thus, why not make it as fast as possible!

In this article, I'll outline some of the things I do with all my VPCs in order to keep them up to speed. Some of these things I've picked up along the way from my own experience, from the Virtual PC newsgroup, virtualization blogs, webcasts, and other sources. One disclaimer: I did receive a list of some performance things from someone who I wanted to give credit to, but he claimed he got the list from someone else and he wasn't sure who that was so he didn't want to claim credit for something that was someone else's work. Thus, some of the techniques listed here may not be original, so please don't take it that I'm trying to play them off as such.

Most of the items in this post will have only a tiny effect on your virtual machines. However collectively, they should help over the long haul, and surly squeeze a bit more performance out of your virtual environment... now, onto performance!

A Little Organization

First things first, let's get organized! I love BGINFO from www.sysinternals.com. When all of my VPC's boot up, I have them set to update the desktop so I can see the following information (you can view a sample from a VPC I recently ran up to test & get used to ISA 2004):

  • Machine name
  • Fully qualified login of current user logged in (domain\account)
  • Installed OS version & service pack level
  • Boot time & stamp when the BGINFO script was executed
  • Amount of RAM and CPU
    (not like CPU matters because it's a VPC)
  • Networking info (IP, gateway, DNS, DHCP)
  • Drive size and space available

If you're interested, you can download my BGINFO settings file and
use this batch file to update your desktop when you login. Add a
shortcut to the startup Start menu folder for the All Users profile and
set it to run minimized. Make sure the batch file points to the correct
location of your BGINFO.exe and the settings file (I stick mine in my
c:\utils folder).


click to enlarge

Hardware

  • The more memory you have, the better. I've run full blown developer VPCs with the configs above with only 768MB in the host OS. Personally, I would try to get 2GB on your host OS and dedicate at least half of that to a VPC.
  • Put all your VPC's on a separate drive from you OS drive. This reduces contention. The best option IMHO is to get one of those self powered USB 2.5" disks like this one. Spend the extra money for the faster drive (5400 RPM), you'll notice an improvement if you do. With that being said, I'm running a 3.5" drive that requires external power... but I primarily use it at work so portability wasn't the biggest factor... honestly the biggest factor was the $10 instant rebate and $40 mail in rebate which made this 80GB 7200RPM drive cost less than $40.  Can't beat that! 
  • Keep the drive where you store your VHD files defragmented.
  • Keep your VHD files as defragmented as possible: VHD's are massive... the fewer fragments they are in the faster they'll run. I use a tool called contig from SysInternals to analyze and defragment a specific file.  Here's what contig looks like:

AntiVirus

Shut off your AntiVirus software: unless you can exclude VHD and VSV files from being monitored by AntiVirus applications, shut it down... it's just more disk contention that you have to deal with.

Kill Unnecessary Services on Startup

Every time your machine boots up, various services are started automatically. Many are important and required, but some just aren't needed within a disposable or hosted environment such as a VPC. Some of the services I always kill are:

  • Help & Support
  • Print Spooler
  • Error Reporting Service
  • Task Scheduler (unless my VPC contains SharePoint, or another app that needs it) 

An easy way to do this is to create a batch file that stops each of these services on startup. I used the same method that I used for updating my desktop with updated system info. Feel free to download and use my batch file. Just add a shortcut to the startup Start menu folder for the All Users profile and set it to run minimized... same deal as before.

Disable Visual Enhancements

Unless you're an avid reader of the Virtual PC Guy's WebLog and follows his Gaming under Virtual PC posts, you don't need to have your VPC have the most optimal visual experience (than again, maybe you do... but you're sacrificing performance for it).

Trimming the visual enhancements from your VPC is very simple. First, disable your video hardware acceleration:

  • Right-click on the desktop and select Properties
  • On the Settings tab, click the Advanced button
  • Under the Troubleshoot tab, drag the
    Hardware acceleration slider all the way to the left
  • Click OK out of the dialogs

click to enlarge

Next, you need to disable the visual enhancements in the OS. These are the fading & sliding menus, smooth font edges, etc.

  • Right-click My Computer and select Properties
  • Under the Advanced tab, click the Settings button
    under the Performance section
  • Under the Visual Effects tab, select the radio box
    for Adjust for best performance
  • Click OK out of the dialogs

click to enlarge
  

Disable System Protection/Safeguards

If you're running WindowsXP as the guest OS (the OS within your VPC), you should disable the system restore process that helps you rollback changes to your environment. It's an unnecessary monitoring service, one you can duplicate using VirtualPC's undo disks.

  • Right-click My Computer and select Properties
  • Under the System Restore tab, check the checkbox
    for  Turn off System Restore on all drives
  • Click OK out of the dialogs

click to enlarge

Another setting enabled on a default install is the OS will create a memory dump file on a system failure. While this information is helpful if you're on a PSS call troubleshooting a BSOD or if you're handy with WinDbg and understand the intricacies of debugging, I don't deem it necessary... and it's quite easy to disable:

  • Right-click My Computer and select Properties
  • Under the Advanced tab, click the Settings button
    under the Startup and Recovery section
  • Under the System failure section, select (none) in
    the Write debugging information subsection
  • Click OK out of the dialogs

click to enlarge

Disable System User Friendly Settings & Accessibility

Finally, there's one last setting to disable. By default, Windows will search for network drives and printers. Yet again, it may be helpful in day-to-day usage, but within a VPC, I don't deem it necessary. This setting can be found in the folder options dialog.

  • Open Windows Explorer
  • From the Tools menu, select Folder Options
  • Under the View tab, make sure Automatically search
    for network folders and printers
    is unchecked (the
    first option in the list)
  • Click OK out of the dialogs

click to enlarge

Conclusion

As mentioned at the beginning of this article, each of these tweaks on their own won't yield a noticeable improvement. However, collectively they should squeeze a bit more performance out of your Virtual Machines.

posted on Wednesday, March 08, 2006 12:13 AM

Feedback

# Virtual Server r2 : premiéres impressions 4/19/2006 6:29 AM The Mit's Blog

Suite aux techdays et moultes dicussions avec Pierre Lagarde et Bernard Fedotoff, je me suis tenté...

# HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/8/2006 7:44 PM Steve Bargelt


# HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/8/2006 7:57 PM Steve Bargelt


# Squeeze Performance out of your VPC 3/8/2006 10:31 PM Sir Wormalot
Good article from Andrew Connell regarding how to squeeze more performance out of your virtual machines....

# HOWTO: More Performance Out of Your VirtualMachines 3/8/2006 11:05 PM Dugie's Pensieve
Andrew Connell in fine spirit has published another HOWTO, "Sqeeze Performance Out Of VirtualPC".  A...

# Virtual PC Performance Tips - Squeeze Every Last Drop 3/8/2006 11:24 PM Wayne Larimore - his bloggin' We


# Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/13/2006 3:35 AM Darren Gosbell's Random Procrast


# re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/24/2006 7:10 AM SJ
Also, disable the Wireless Zero Config service if its running and set to automatic. VPC doesn't have and can't have a wireless card so this service is unnecessary.

 re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/10/2006 8:44 AM Yzangard
Hello all,

An efficient way to make sure your vhd (for Virtual Server or PC, same thing applies also for VMWare) won't fragment is to partition your target HD and then to make NTFS mounts for your virtual machine's folder. That way, files can't be fragmented.

# HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/7/2006 9:29 PM Andrew Connell [MVP MCMS]


# Want to Speed up your VPC? Read Andrew Connell's HOWTO 3/8/2006 7:26 PM Angus Logan's Portals Blog
My old buddy Andrew Connell has written a great article on HOWTO: Squeeze Every Last Drop of Performance...

 re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/29/2006 9:23 AM Rubberman
Use nlite before installing your OS to remove as much crap out of the OS as possible - got my XP install down to 700mb and running smoothly so far.



# Speed up your VPC's 3/30/2006 10:57 AM Niklas Nihl


# Speed up your VPC's 3/31/2006 9:17 AM Niklas Nihl


# Speed up your VPC's 3/31/2006 9:39 AM Niklas Nihl


# Speed up your VPC's 3/31/2006 9:58 AM Niklas Nihl


# Speed up your VPC's 3/31/2006 10:05 AM Niklas Nihl


# Speed up your VPC's 3/31/2006 10:28 AM Niklas Nihl


# Great performance tips for Virtual PC from Andrew 3/20/2006 7:43 AM Remco's Blog


# Virtual PC performance Advice 3/20/2006 8:21 AM Meandering-Blog

I found this tidbit while reading Remco's
Blog (off the Sharepoint Blog Site)
On the blog ...

# re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 9/22/2006 1:38 PM Will Harper
Gravatar Do the new Intel D 9xx or AMD X2 CPUs add any useful VPC performance improvements over, for instance a n Intel P4 531? (Same MHz speeds for comparison)

Will Harper
MCT, MCSE
Trainer/Consultant
www.hyperlearn.com

# re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 9/23/2006 2:05 PM AC [MVP MCMS]
Gravatar Will - I not aware of any special virtualization features in those CPUs, but dual core (Intel D & AMD x2) definately give you a performance boost over the single core CPUs.

 re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 10/12/2006 1:26 AM Markus
Gravatar I doubt the hype about dual-core. I have a dual core AMD but am not happy for the money I spent. Even though I have SATA 2 HD it still appears to be a bottleneck. Only one CPU can hit the HD at a time. Getting dual-core, get SCSI.

Virtual PC is very slow. I am a programmer and some programs crash on dual-core.

# re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 10/13/2006 8:43 AM AC [MVP MCMS]
Gravatar Markus - Something tells me you're dealing with a local issue. My dual core Intel chip makes my VirtualPC machines run much faster.. and my dual core AMD x64 screams running Virtual Server 2005 R2.

 re: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 12/1/2006 2:54 PM Mike
Gravatar Yeah nLite is a kick ass software.
My favorite proggy!

Here is another useful resource for you article:
http://addons.wordpress.com/

A hell what of nLite addons :)

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 4 and 5 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2009 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 4-day hands-on and 5-day online WCM classes for developers I offer through the Ted Pattison Group.

Get more information on the WCM courses!


Upcoming Classes
 Hands-on WCM:
 » Las Vegas, NV
   April 20-24, 2009
 Online WCM:
 » Feb 9-13, 2009


» Register today!

JAX Office Geeks
Jacksonville Office Geeks (JOG)
JOG is a special interest group in Jacksonville, FL dedicated to bringing the local SharePoint commnity together to share tips, tricks, ideas and best practices for developing solutions on the SharePoint platform.

Next meeting details...
When:
Thur. Feb 19th, 2008
  6-8p EDT
Topic:
Cheap and Easy Wildcard Search

Speaker:
Becky Isserman

RSVP Today!


» Subscribe to the JOG newsletter