Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

[EN] VM alignment, problems and solutions

Luca Dell'Oca, November 9, 2011November 7, 2011

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:

– Vizioncore vOptimizer Wastefinder Utility

– few days ago was released the awesomeUBERAlign, written by Nicholas Weaver.

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!

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tech

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy