In a VMware environment, there are three different storage layers that abstract physical disk from the storage up to the virtual machines (imagines are taken from a ESX 3 whitepaper, Recommendations for Aligning VMFS Partitions):
Every layer oganizes informations following its own logics, and many times these are not aligned with each other. A SAN can format its space in 128kb blocks , VMFS will format lun with 64kb, and inside the VM the guest operating system will format its virtual disks following its logics (for example, Windows uses different block sizes at different disk size, look here for further info).
The result, almost always, is that the three layers are never aligned, and every read/write of a single block in the VM can involve up to three storage blocks:
This obviously leads to a performance decay, or at least to an excess of unneeded I/O on the storage. If the three layers were aligned, we would have something like this:
where activity on a VM block involves only one storage block, maximizing performances.
The problem, often, is not in the VMFS, since this is aligned during creation at 64k, a value compatible with most of the storage vendor (anyway better to check your specific storage).
So, where the decay happens? Usually inside the VM file system. If you see NTFS and VMFS values, you can see:
Windows 2003: 32k alignment, over a VMFS at 64k -> 32k / 64k = 0,5 -> Not aligned
Windows 2008: 1024k alignment, over a VMFS at 64k -> 1024k / 64k = 16 -> Aligned
We can do this check for oter operating systems: whenever the result number is not a fraction, partition is aligned.
So, if a Windows 2008 is aligned (WARNING: only with scratch installations, not on upgrade from previous versions!), this is not true for others OS.
How we can check alignment? There are some options, and the two most common are:
To understand what UBERAlign can do, and the great features Nick has putted into the software (totally free!), read the link. UBERAlign is able to both analyze alignment state of VM, and to correct the alignment. Some of the most interesting features:
– it manages linux and windows; even C: disks not supported by other tools, primary or extended, even with non conventional drive letters
– it can reclaim free space during the alignment, even converting a disk from thick to thin
– up to 6 cuncurrent jobs
– it works IN-PLACE, so there is no need to copy disks
– automatically creates a VM snapshot before doing the alignment, so if something go wrong it can do a revert
I’m deploying the application (it’s based on a virtual appliance + console) in my lab, I will do another post with some real cases!