June 16, 2015

Virtual Disk Alignment

Align Virtual Disks

In a properly aligned storage architecture, the units of data in the various storage layers are aligned in such a way as to maximize I/O efficiency. In an unaligned storage architecture, accessing a file from the OS layer results in extra I/O operations at the other storage layers.

Shown here is a properly aligned structure with Windows guest OS clusters, VMFS blocks and SAN chunks.


I/O access at the guest OS layer results in a minimum amount of I/O access at the other layers: VMFS and SAN.

I/O operation on Cluster 1 results in I/O operations of one block at the VMFS layer and one chunk at the SAN layer. No extra SAN data access required.
In an unaligned structure the units of data at the other layers are not laid out on even boundaries.

I/O operation on a single cluster may result in many additional I/O operations at the other storage layers.

I/O access (Cluster 2) from the guest OS layer results in extra I/O access at the other layers: VMFS (two Blocks) and SAN (two Chunks). Reading one cluster at the guest OS layer results in reading multiple blocks and chunks.

"An unaligned architecture incurs latency and throughput penalties. The additional I/O (especially if small) can impact system resources significantly on some host types."

Virtual disk alignment issues occur when the starting offset of the VMFS partition does not align with the physical segmentation of the underlying disks.

"Using the vSphere Client to create VMFS partitions avoids this problem since, beginning with ESXi 5.0, it automatically aligns VMFS3 or VMFS5 partitions along the 1MB boundary."

The purpose of alignment is to minimize extraneous internal array operations. All arrays have internal constructs that are generally a function of the RAID model (and also the filesystem alignment, and in some cases logical page table constructs in virtually provisioned models).

"The improper alignment of VMFS file system partitions may impact performance. The recommended practice is to add VMFS storage to ESXi hosts using the vSphere Client, as it automatically aligns VMFS partitions when it creates them. For ESXi 5, VMFS3 and VMFS5 file systems that are created using the vSphere Client are automatically aligned on a 1 MB boundary.

VMFS3 file systems created with a previous version of ESX/ESXi used 64 KB alignment. Partitions that are created using vmkfstools may be aligned manually using the partedUtil tool from the command line. For detailed instructions on using partedUtil, refer to the VMware Knowledge Base entry: http://kb.vmware.com/kb/1036609."

Reference:

No comments:

Post a Comment