Q. Does it make sense to defrag Windows computers that are VMware virtual machines (VMs)?

Greg Shields

November 23, 2010

2 Min Read
ITPro Today logo in a gray background | ITPro Today

A. This month, reader Blue Michael Planté of La Habra, California asked the question, "I cannot get a concrete answer. Does it make sense and should we defrag our Windows machines that are in a VMware VM?"

The answer has two parts, because fragmentation in VMware virtual environments can actually happen in two different places. First is within the VMFS file system where your VM's VMDK (and other) files are located. The VMFS file system is substantially different from the NTFS file system in Windows. Among other traits, its block size is significantly larger, with VMFS' block size measured in megabytes as compared to NTFS' kilobytes. Files inside the VMDK file system also tend to be larger than files in NTFS. While fragmentation can and will happen inside the VMDK file system, these two facts tend to reduce its effect on performance.

Thick disks, those that are pre-allocated as they're created, also tend to have less fragmentation within the VMDK file system than thin-provisioned disks. Because the entire size of a thick disk VMDK file is allocated at once, these disks tend not to grow fragmented. Thin disks, because they can grow over time, will experience slightly more fragmentation.

In either case, most environments needn't worry about fragmentation's impact on performance within the VMFS file system. VMware's knowledgebase article 1006810 discusses this conclusion in more detail.

Conversely, the NTFS file system inside your Windows VMs does experience performance-affecting fragmentation. This fragmentation occurs whether the Windows computer is physical or virtual. As a result, you probably should defragment the disk files of Windows computers.

One element of defragmentation utilities running inside VMs warrants attention. The resource utilization of a defragmentation utility can be significant. Running the defragmenter can spike resource use, taking away resources from other VMs on the host—the defragmentation process itself could have an effect on VM performance.

Be careful not to enable a defragmentation pass on every VM at once, or you might severely hurt performance. Also, consider exploring one of the new generation of virtualization-aware defragmenters that's on the market today.

Catch up with @ConcentratdGreg on Twitter!

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like