From: www.itworld.com

Windows Tip: Optimizing virtual machine performance

November 21, 2007 —

 

Send your Windows question to Mitch today! | See other Windows tips



Virtualization is popular in the enterprise today, but getting the best performance
from a virtualized operating system can be challenging. One issue you may not
have considered has to do with the different types of virtual hard disks (VHDs)
supported by Microsoft virtualization products such as Virtual PC and Virtual
Server. For instance, one choice you can make is to choose between fixed-size
or dynamically-expanding VHDs. Which performs best?

Dynamically-expanding VHDs are convenient because they only use as much physical
disk space as they need on the host machine. Then when more space is needed, the
VHD expands to accommodate the needs of the guest operating system. The process
of expanding the VHD files adds some overhead, but not a lot usually.

The kicker though is that dynamically-expanding VHDs fragment easily and this
can degrade performance considerably over time. One test I performed on a fragmented
VHD showed almost 15% greater disk I/O operations per second than on a similarly
configured guest using a fixed-size VHD. And with fixed-size VHDs, you only need
to defragment your host machine once to get a contiguous .vhd file on the host.
After that you simply defrag your guest machine regularly and your disk I/O performance
will be optimized. By contrast, with dynamically-expanding VHDs you have to defrag
both the host and guest machines regularly to maintain your disk I/O performance.

With the low cost per GB of near terabyte-sized HDs nowadays, there's really no
reason to skimp on disk space by using dynamically-expanding VHDs, especially
in a production environment. So make the right choice and get the most out of
your virtualized systems by using fixed-size instead of dynamically-expanding
VHDs. Just be sure to allocate enough room for your operating system and application
needs on your virtual boot/system volume.