Virtual Server Performance Tips for Developers


I am in the process of creating a virtual machine for MOSS development and wanted to blog about some of the tips I found useful.  There are two choices for running virtual machines using the Microsoft software from your MSDN subscription: Virtual PC and Virtual Server.  If you want to go beyond your MSDN subscription VMWare offers a VMware Workstation 6 for Windows for $189.  But, I am going to focus on Microsoft virtualization products in this post.
 
If you are using Microsoft Virtual PC 2007, then you have more limitations than Virtual Server 2005 R2.  But you can take the virtual machine images built on Virtual PC and run them on Microsoft Virtual Server 2005 R2 with little or no hassle.  The same is not true in reverse.  If you build a virtual machine on Virtual Server and take advantage of the faster performing virtual SCSI bus, then you will not be able to run your virtual machine on Virtual PC unmodified.  Luckily, a virtual SCSI bus and virtual SCSI hard drives are easy to convert to IDE unlike physical SCSI hardware.  Simply shut down your Virtual Server image, edit the configuration to change the hard drives from SCSI to IDE and you are done.  So, here is my first tip:
 
Tip #1: use SCSI if you don’t need portability between Virtual Server and Virtual PC.  The virtual SCSI data bus is much faster than the virtual IDE bus.  It does not matter what the underlying hardware really is.  For more tips about Virtual Server see the following link from Microsoft Support: Virtual Server 2005 performance tips.
 
If you are already using IDE, here is a blog post that describes how to convert to SCSI: How to Convert a VHD boot disk from IDE to SCSI IN Virtual Server 2005 R2.  This post also shows you how to install the "fast" SCSI driver.
 
Tip #2: if you are using Virtual Server 2005 and you arn’t using R2, upgrade.  Jeremy Jameson explains why in his blog: Virtual Server Issues and Recommendations for MOSS Virtual Environments.
 
Tip #3: use the fastest physical hard drive possible for your virtual hard drive.  Doesn’t matter if you are running on a desktop, laptop, or server.  For example, if you are running on a desktop, add a second hard drive for your virtual machines or use an external hard drive.  The faster the better.   On a laptop use an external 7200 RPM or faster with FireWire or eSATA.  If you don’t have FireWire or eSATA, you can get by with USB 2.0 but realize that even though USB 2.0 has comperable bandwidth as FireWire 400 (IEEE 1394a) the actual real thoughput is twice as fast with FireWire because of the extra overhead that USB requires from the system.
Here is a comparison of USB 2.0, FireWire 400, FireWire 800, and eSATA on WikiPedia: eSATA in comparison to other external buses.
 
Also another thing to be aware in regards to speed, a laptop harddrive spinning at 7200 RPM is 40% slower than a desktop harddrive at 7200 RPM.  The reason why is that a 2.5 inch disk has less surface area than a 3.5 inch disk.  So when those two disks are spinning at the same speed, the larger form factor covers much more surface area.   So if you buy an external hard drive for developing on your virtual machine get an enclosure that houses a 3.5" disk.  And go for eSATA or FireWire if you can.  Many disks now come with multiple interfaces. 
 
LaCie has a quad interface with USB 2.0, FireWire 400, FireWire 800, and eSATA: LaCie d2 Quadra Hard Drive.  I don’t have a LaCie drive and I am not promoting it, I just use it as an example of a drive that you can connect to your desktop at home or office with eSCSI or FireWire, and then take on the road (a bit cumbersome for road warriors, but may be worth it) and connect worst case using USB 2.0 on your laptop.
 
Tip #4: If you are using Virtual Server, use Remote Desktop to connect.  You can’t use Remote Desktop when you are installing the OS, but after the OS is installed, you can enable and connect through Remote Desktop Connection.
 
In the future I will include some more tips on virtual machines for developers.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s