Don Roessler's Blog

This blog will be a primary way for our Microsoft Partners to follow up on questions that needed research during my TS2 Partner Seminars across the United States.
Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs
Multiple Spindles
Putting your .VHDs on a separate file from your C: drive is the single best thing you can do to improve Virtual PC performance.  The performance gains of a second hard drive nearly always outweigh any slow access issues, so even if you only have an older 4800 rpm external drive, go ahead and use it.  A separate USB/Firewire external drive or a multibay drive to host your .VHDs is well worth the investment.

Note: People often ask about host drive partitioning - there's not performance gain by logically partitioning your host drive.  It may make it easier to manage/clean up the drives, but could also increase fragmentation.  Recommendation is to keep everything on a single partition.

Happy, Healthy Drives - Defragging & Compacting your Drives
Background on Fragmentation: The computer writes information disk into concentric circles on the hard drive, called tracks.  Each track is divided into small sections, called sectors.  When a file is written, the computer puts it into the first open sector.  If the file is bigger than the sector, it gets written across multiple sectors.  When a file is deleted, that sector frees up and is listed as open.  The sector isn't physically deleted - instead, it's marked as clear, and eventually it'll be overwritten by new data.  That's why recovery software can retrieve deleted files off a computer, even if it's been deleted, recycle bin is empty, etc.  In Virtual PC, this can make a .VHD file larger than the amount of data it actually contains, because some of its space is taken up by open sectors that haven't yet been overwritten.  Virtual PC has a wizard that will compact .VHD files and free up space.  Fragmentation occurs when a files is written into open sectors that aren't physically continuous on the disk, which happens over time as scattered sectors are marked as free.  Defragging moves the files around, lining their individual sectors up together physically, so the magnetic read/write head in the drive doesn't have to move so much.  With Virtual PC, we experience two levels of fragmentation: files inside the VPC are fragmented across the virtual drive, and the .VHD file itself can get fragmented, especially if you've loaded then deleted a lot of VHDs or other large files.  A lot of the performance issues we can experience with Virtual PC are the result of drive fragmentation.  These steps will defrag your Virtual PC hard drive, compress it to a smaller file size, and optimize its location on the host drive.

How to Defrag:

1.       Defrag your Virtual drive.

a.       Launch the Virtual Machine, log in as an administrator

b.      Remove any Installation temporary folders or un-needed folders

c.       Empty the Recycle Bin

d.      Go to Start/Programs/Accessories/System Tools and run Disk Defrag

e.       This can take 10 minutes to 30 minutes to run

f.        Do this at least 3 teams, until it defrags quickly

 

2.       "Zero out" your Virtual Drive.

a.       Go to http://toolbox/details/details.aspx?ToolID=22494 and download the .ISO file to your host machine

b.      Go into the Virtual PC, go under the CD menu and choose "Capture ISO Image".  Point it to the file you downloaded

c.       The precompactor will start automatically and crank along for about 15 minutes

(We need to do this to clear out any sectors that have yet to be overwritten in the .VHD)

 

3.       Compact your Virtual Drive

a.       Shut down any running Virtual PCs

b.      Under the Virtual PC console, select “File” then “Virtual Disk Wizard”

c.       Select “Examine or Modify existing disk image”

d.      Select the disk image file you wish to compact

e.       Select “Compact the disk image”

f.        Select “Use original file” (or a separate file if you require)

g.      Finishing the Wizard will compact the file. This may take a long time

 

4.       Defrag your host drive (the one the .VHD files are sitting on)

a.       Shut down all applications on your laptop.

b.      On your laptop go to Start/Programs/Accessories/System Tools and run Disk Defrag

c.       Do this at least 3 times as well - until it defrags quickly

Note: The host defrag step takes the longest - it can take 30 minutes to several hours to run.  You'll need at least 15% of the disk free to run the defrag optimally.  If you have really large files (like VHDs) they may not defrag - it'll tell you in the log report when it's done.  If that happens, move them off your main drive to a backup location, run step 5 again, then move them back onto your drive.

Tip: If you zip up VHDs you won't use for a while, you can compress them to about 50% their original size.  If you're working with standard images, just delete the VHDs and restore them from the TAN

 

Optimize Your Guest Machine Performance
You can do a little tweaking to your guest machine if your demo is running Windows XP to improve its importance and (most importantly) reduce its disk activity.  In theory, the DemoRUs, TAN, BSGP, SST and MBS teams should do this to their images before they ship them to us, but it's an easy thing to forget.  Remember to shut down and save changes to commit these settings to the VHDs.

Visual Effects.  Disabling some of the Windows XP special effects and visual enhancements in the Virtual PC can make the demo feel “snappier” when opening menus and windows.

1.       Open Control Panel from the Start menu and choose “System”.

2.       Choose the “Advanced” tab.

3.       Select the “Settings” button under the Performance section.

4.       Check the “Adjust for best performance” box and click “Apply” to apply the settings.

Notes: If you choose the “Custom” option, you can selectively enable or disable specific effects. I usually turn "Use Visual Styles" back on so it has the Windows XP look and feel, but turn off all the animated menus, fade effects, cursor shadows, menu shadows, etc.  I also use a custom background to tell my VMs apart.

Video Acceleration.  Ensure that the Virtual Machine is using the full video acceleration of the host (For Windows XP, Display properties -> settings -> advanced -> troubleshoot -> and move the 'Hardware acceleration' slider all the way to the right)

Turn Off Remote Desktop.  Unless you need it in the demo, disable Remote Desktop in your Virtual PC.  Otherwise it runs in the background watching for RA calls.

1.       Go back to Control Panel/System/Advanced

2.       Choose the “Remote” tab

3.       Make sure both “Allow Remote Assistance…” and “Allow users to connect…” are unchecked and click OK.

Turn Off System Restore.  You don't need it for demo, especially if you're using Undo Disks in Virtual PC. 

1.       Go back to Control Panel/System/Advanced

2.       Choose the “System Restore” tab.

3.       Check the “Turn off System Restore on all drives” box and click OK – confirm OK when asked if you’re sure you want to disable System Restore

Folder Options.  The way that items in folders are displayed can have an impact on the perceived speed of the operating system. Follow these steps to optimize folder views in Windows XP.

1.       Open My Computer.

2.       Open the C: Drive (Local Disk).

3.       Choose “Folder Options” from the “Tools” menu.

4.       Make sure “Use Windows classic folders” is selected.

5.       Select the “View” tab.

6.       Uncheck the “Automatically search for network folders and printers” option.

7.       Click “Apply”.

8.       Click the “Apply to All Folders” button.

9.       Click OK to close the Folder Options dialog.

 

NTFS Compression (Advanced).  In theory, if your host CPU is powerful enough (P4), switching on the NTFS disk compression technologies inside the virtual machine can increase performance.

Mouse Cursors.  Use a flat mouse cursor inside a Virtual PC and a 3D cursor in host environment.

Optimize your Host Machine Performance
Your "host machine" is your laptop.   Little things, like closing Internet Explorer, PowerPoint, and Outlook are very helpful in keeping your demos running fast.

Close other apps.  Shut down other applications, especially Outlook, before running Virtual PC

Start VPCs One at a Time.  With demos that require more than one machine, wait until the first virtual machine has completed loading, logged in and the hard disk and network lights have calmed down before launching the next virtual machine.  This also helps prevent fragmentation on your host drive.

Hide the Virtual PC Console.  Minimize the Virtual PC application (the console) as this displays a reduced view of the active sessions.

Optimize the Virtual PC Application Performance Settings.  (In the Virtual PC console, go to File/Options to access these advanced settings.)  Set “CPU Time” to “Allocate more CPU time to the active window” if you're doing a demo with a single VHD image.  If you have a demo with a SharePoint server, set the performance to "Divide Time Equally."  Set “Virtual PC background performance” to “Run at maximum speed”

Install More RAM.  Increasing the memory will reduce the amount of disk paging the operating system has to perform; as disk i/o is most likely to be the slowest component of the host machine, switching off the page file and increasing memory may provide additional performance.


General Demo Tips & Resources
Use a desktop backgrounds to enable identification of virtual machines and their purpose
Create custom background with branding or call-to-action (nicely done)
Run demos at 800x600 if possible - easier to see, less bandwidth in Live Meeting (at lets you resize sharing pane and keep LM controls up)
Screen height to room depth ratio is 1:8 (i.e. 5' high screen can been seen from 40' away)
Consider using the largest standard mouse cursor and turn on mouse trails so it's easier to follow along

Super-Geek Tip!

Create a RAM Disk large enough to accommodate the VHD image file (plus additional space for expansion) and assign a drive letter to it. Copy the virtual machine to this location and run the image from the RAM Disk drive.  Incredibly fast but you need 5-10 gigs of RAM.

Published Monday, December 19, 2005 12:34 PM by donroe

Filed under:

Comments

# 23 Links Today (2007-07-25)@ Wednesday, July 25, 2007 8:25 AM

PingBack from http://mhinze.com/23-links-today-2007-07-25/

23 Links Today (2007-07-25)

# http://ts2blogs.com/blogs/donroe/archive/2005/12/19/512.aspx@ Sunday, March 16, 2008 4:27 PM

Pingback from  ts2blogs.com/.../512.aspx

http://ts2blogs.com/blogs/donroe/archive/2005/12/19/512.aspx

# dvd clone@ Saturday, March 22, 2008 9:09 PM

This strip reminded me of my Cryptology class for which I was the TA with an enrollment of 70 students. Weekly assignments were horrible as I spent more time grading them than the students may have spent on searching for the solutions. Exams were the

dvd clone

# http://ts2community.com/blogs/donroe/archive/2005/12/19/512.aspx@ Friday, April 04, 2008 9:24 AM

Pingback from  ts2community.com/.../512.aspx

http://ts2community.com/blogs/donroe/archive/2005/12/19/512.aspx

# dvd decrypter error@ Friday, May 02, 2008 1:17 AM

When my clients ask me if there is anything they can do to tweak the performance of their internet connections to speed up web browsing, this is the first trick of the trade that I show them. They’ re always pleased with the results, especially for the

dvd decrypter error

# Virtual PC 2007 Tips and Tricks | Philosophical Geek@ Thursday, May 22, 2008 10:42 AM

Pingback from  Virtual PC 2007 Tips and Tricks | Philosophical Geek

Virtual PC 2007 Tips and Tricks | Philosophical Geek

# Links of the Week #38 (week 21/2008)@ Sunday, May 25, 2008 6:00 PM

Development ResEx - Translation friendly resx editor for strings. Great for internationalization of small

Zunanji viri

# Reflective Perspective - Chris Alcock » The Morning Brew #101@ Tuesday, May 27, 2008 3:13 AM

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #101

Reflective Perspective - Chris Alcock » The Morning Brew #101

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Thursday, May 29, 2008 5:17 PM

Hi,

There are a few more tips for VPC optimization at blogs.ipona.com/.../8419.aspx

Thanks, Dan

Dan

# dvd burning programs@ Wednesday, June 04, 2008 6:15 PM

Zoom Player is the most Powerful, Flexible and Customizable DVD and Media Player for the Windows PC platform. Using our powerful Smart Play technology, more media formats play with less hassle, improved stability and greater performance.

dvd burning programs

# how to copy dvd@ Sunday, June 08, 2008 4:47 AM

Link: Optimize Ubuntu Feisty Fawn for Speed- Tips for a faster Ubuntu machine! -

how to copy dvd

# dvd decoders downloads@ Sunday, June 08, 2008 6:36 AM

Square Enix’ s“ White Engine,” now renamed the Crystal Tools, has been confirmed for work on platforms of PS3, XBox 360 and PC. Also they did announce that they will be using a dumbed down version of Crystal Tools for the Wii Platform. They also showed

dvd decoders downloads

# www.dvddecryptpro.com@ Monday, June 09, 2008 8:57 AM

The important thing to note here is the address bar in your browser- it still shows the link that your visitor clicked on. The program also offers a secure cookie option and the ability to promote the cloaking program itself if you so wish. On the face

www.dvddecryptpro.com

# shrink dvd size@ Saturday, June 14, 2008 10:12 AM

Recent Posts \"Crawling\" Toward SDL SDL and Web 2. 0 The First Step on the Road to More Secure Software is admitting you have a Problem Wrapping up Threat Modeling More trustworthy election systems via SDL?

shrink dvd size

# record from dvd@ Tuesday, June 17, 2008 9:25 AM

Note: Les billets ISS sont une espèce de pot- pourrit des découvertes faites lors de ma veille quotidienne. Pas de niches ou thèmes de prédilections, cela peut toucher tout ce qui se passe sur Internet.

record from dvd

# copy copyrighted dvd@ Monday, July 14, 2008 11:09 AM

Copyright slow style All Rights Reserved.

copy copyrighted dvd

# vhs ripping software@ Monday, July 14, 2008 12:07 PM

“ I sat him down and told him what I thought the problems were with security and force protection and turned him loose,” said Sergeant Fenner. “ Within three months, he’ d established new entry control procedures, with Staff Sgt. David Dike, also from

vhs ripping software

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Tuesday, October 07, 2008 12:22 PM

<a href= � ></a>

Sasha

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Thursday, October 30, 2008 5:09 AM

<a href= http://monfobu.com ></a>

Future_dim

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Tuesday, November 04, 2008 1:59 PM

<a href= http://tipon4.com ></a>

Future_dim

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Friday, November 07, 2008 2:22 PM

<a href= http://index1.airlino.com >hancock reno nv</a>

Future_dim

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Wednesday, November 12, 2008 4:52 AM

<a href= http://index1.riddark.com >real female crucifiction</a>

Gina_M

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Wednesday, November 12, 2008 6:15 AM

<a href= http://index1.riddark.com >pics of 2002 trans am silver with stripes</a>

Dmitr

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Sunday, November 16, 2008 2:59 PM

<a href= http://index1.geribag.com >sixties galleries</a>

Rici

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Sunday, November 16, 2008 9:25 PM

<a href= http://index1.geribag.com >sixties galleries</a>

Polina

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Wednesday, November 19, 2008 1:04 PM

<a href= http://index1.bows4.com >united states trotting association</a>

Nixh

# re: Part 1 - Virtual PC Tuning Tricks - Getting the best possible preformance from your VPCs @ Wednesday, November 19, 2008 7:36 PM

<a href= http://index1.bows4.com >douglas lake association</a>

Vani

Leave a Comment

(required) 
(required) 
(optional)
(required)