Raxco has been working with VMware the past several months to assess the impact of Windows guest defragmentation on VMware performance. The most recent testing used VMware's vscsiStats utility to capture metrics. The vscsiStats utility sits between the VMware kernel and the Monitor. It captures every IO request through the storage stack and sorts them into various buckets that can be used for performance analysis. We ran our test concurrently using five virtual machines on an ESX 4.0 cluster.
The goal of the test was to determine if Windows guest defragmentation improves virtualization performance. The test was fairly simple; we created a fragmented disk with ISO images and other files and made a copy for each of the five virtual machines. We installed MS Office and MS SQL on each of the VMDKs and measured the results with vscsiStats. After the data collection was done on the fragmented disks, we used PerfectDisk to defragment the files and free space on all of the disks and repeated the tests using the defragmented disks.
The results were pretty impressive on several fronts. First of all, one of the main sources of virtualization overhead occurs when IO have to traverse the virtual storage stack. Our testing showed that when the Windows guests were defragmented with PerfectDisk the total number of IO was reduced by 36.5% and write IO was reduced by 44.6% after the MS SQL installation. This means defragmentation was able to reduce the total IO load by over 1/3 for all IO and it reduced write IO by almost half. How was defragmentation able to do this?
The answer is that while file defragmentation improves file read time, free space consolidation improves file write time by reducing the number of physical accesses needed to write the file. If the guest file system can find sufficient contiguous free space, the likelihood of the file being written in one piece improves. Contiguous free space also means you do bigger writes. The vscsiStats bear this out. The PerfectDisk disk created 11.9 times as many IO greater than 524K, which is the largest vscsiStats bucket size. The vscsiStats histogram illustrates this difference on the far right column.




Disk IO latency was also affected by the file defragmentation and free space consolidation of the Windows guests. As noted above, the Windows file system was able to perform fewer and larger IO when the disk is defragmented and the free space is aggregated in a large chunk. It logically follows that these IO will complete in less time and the vscsiStats again support this assumption. The utility sorts IO into buckets ranging from .001ms to >100ms. Since the average disk drive access time is about 15ms, we viewed all IO taking more than 15ms as a slow IO. The vscsiStats show the defragmented disk reduced the total number of IO taking longer than 15ms by 48.7%.

The final metric that showed improvement due to guest system defragmentation was sequential IO. The vscsiStats utility measures the distance in logical blocks between seeks. This histogram shows that the defragmented disk increased the number of IO that were only one block away (center columns) and decreased the number of IO that were 1000 to 500,000 logical blocks away (left and rightmost columns).

In summary, it appears Windows guest file defragmentation and free space consolidation will:
- Reduce VMware overhead by reducing the total number of IO that traverse the virtual storage stack
- Improve system throughput by producing larger IO
- Reduce system latency by reducing total IO and generating larger IO
- Improve virtualization performance by increasing sequential IO
- Reduce the demand for host CPU, memory and IO resources
- Potentially create a situation where the host can support one or more additional guests due to the resources conserved
To access a complete copy of the white paper detailing the test procedures and results go to www.perfectdisk.com/user_data/white_papers/vmware_multi_test_new.pdf































