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


Add to Technorati Favorites

Do you work with virtual machines? How about over a long period of time? You’ll know that over time, they seem to slow down under heavy use. Why is that? There are plenty of reasons, some are specific to virtual environments, some are more general. This post will focus only on the virtual aspects… general aspects are things like installing tons of beta software, a lot of apps that run in the background or on startup, etc..

The two biggest reasons I see virtual machines get slower over time is due to (1) incorrect virtual machine additions installed and (2) disk fragmentation. If you work with large VHD’s, disk fragmentation becomes your biggest enemy. Seems this is my biggest issue lately working in Office SharePoint Server 2007 beta VPC’s I’ve built… these things are easily 5–15GB depending how you organize your environment.

Some of these topics are covered in my HOWTO: Use Virtual PC’s Differencing Disks to your Advantage article.

Virtual Machine Additions

Make sure you have the latest Virtual Machine Additions loaded. Keep in mind that moving a VHD file from a VirtualPC environment to a Virtual Server environment may result in a sluggish performance… at least I experience that. When I move virtual machines from VPC->VS or vice versa, I always uninstall the virtual machine additions and reinstall the ones for the current environment. It’s my experience that the two (VPC Additions & VS Additions) are not the same and making sure you’re using the one for the current environment can make a world of difference.

Don’t Let Your Disks Get Fragmented!

OK, that’s near impossible. What ~is~ possible is that you can defrag them frequently. What needs to get defragmented? Two things: you virtual disk (the one that your guest OS is installed on) and your physical disk (the one your host OS is installed on). Here’s what I recommend:

Defrag your guest OS disk: Within your virtual machine, run the Windows disk defragmenter three times… yes three times does help. Each time the defragmenter is defragmenting files, it’s moving things around in order to make files more continuous. At the same time, it’s rearranging your disk so the used space is as close to the start of the disk. However, if you only run one pass of the defragmenter, it’s just not going to have enough free space to shuffle the desk and get things in their optimal place. Running it two more times gives the defragmenter enough chances to get things optimally organized. The worst run is always the first… the second and third passes go faster and faster.

Compact your VHD: If you’re using differencing disks, this isn’t an option for you as you can’t compact differencing disks. If you aren’t, then compact it! I explain this process in my HOWTO: Use Virtual PC’s Differencing Disks to your Advantage article, about half-way through… the second paragraph after my “Core Base Disks” image explains how to do this.

Defrag your host OS disk: Once the virtual machine is shut off, run Windows disk defragmenter three times… same reasons I explained in the Defrag your guest OS disk section above.

Make sure your virtual machine’s VHD is not fragmented: Not all files can get defragmented… some are too big to reorganize by the Windows defragmenter. For this, I use CONTIG.EXE from SysInternals. You can use this awesome utility to check how many fragments a file is broken up into or all files in a directory. It will also let you defrag a specific file.

BTW: I finally added two “Virtualization” categories… one for my blog, one for my articles hosted on my blog.

posted on Thursday, May 18, 2006 3:37 PM

Feedback

# re: Making sure your virtual machines are running at the peak performance... 5/19/2006 4:06 PM Spence
If you are virtualisation junkie it is worth investing in Diskeeper. This provides much better defrag and performance over and above the windows defrag utility. Including boot time options, smart scheduling and avoids the requirement to run multiple times. Diskeeper is a must have utility for virtual machine environments.
I'd also recommend storing your VHDs on a seperate fast spindle from the Host OS.

# re: Making sure your virtual machines are running at the peak performance... 5/19/2006 11:36 PM AC [MVP MCMS]
Gravatar Spence - I've heard the same about Diskeeper... just operating on a budget :). As for the separate spindle, I couldn't agree more... but that's not an issue in "degrading performance over time"... that would be a lesser experience from the git-go... however, it is a good point (I included it in my "HOWTO" article linked in this post.

# SharePoint Links 05/06/2006 6/5/2006 5:57 AM sharepoint_blog_1
What was supposed to be a daily list failed after the first day! Still after a busy week last week I'm...

 re: Making sure your virtual machines are running at the peak performance... 3/27/2008 10:33 AM Isaac
Gravatar Hi,

have a really powerfull server:
2 quad processors with Intel Virtualization Performance
300 GB 10 RPM Raid 0 - Hard drives
4 GB RAM
Windows Server 2003 Enterprise R2 with SP2

I installed Visual Server 2005 R2 with SP1

I created two remote computer under VS2005, using Vista Business with SP1. Each guest computer has assigned 1.5 GB RAM & 100 GB disk.

I also installed the latest VMAdditions (Virtual Machine Additions).

The remote computers are really slow, and when I say really is because is almost impossible to work with.

Any suggestions?

Thanks,



Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 6 and 2 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