Mittwoch, 25. März 2009

Storage Alignment and VMFS Block Sizes

VIOPS: Proven Practices for Deploying and Managing VMware: Storage Alignment and VMFS Block Sizes

Introduction

 

There are two common questions about storage and VMware Infrastructure that appear on a weekly basis:

 

  1. If my VMFS has a block size of 1MB, does that mean each block read from the guest read 1MB from the SAN LUN?

  2. Should I align my VMFS; should I align my Guest partitions?

 

VMware have written a white paper on this (see Resources), but the key information from that paper has been lifted into here - as well as referring to a great doc from EMC (see Resources) on ESX optimization.

 

Intended Audience

 

VMware Certified Professionals (VCPs) and storage experts when understanding and building VMware Infrastructure on block storage (FC).

 

Outline

 

  1. Aligning Guest -> VMFS -> LUN

  2. Understanding VMFS block size

 

1. Aligning Guest + VMFS + LUN

 

 

Understanding alignment

 

In a SAN environment, the smallest hardware unit used by a SAN storage array to build a LUN out of multiple physical disks is a called a chunk or a stripe. To optimize I/O, chunks are usually much larger than sectors. Thus a SCSI I/O request that intends to read a sector in reality reads one chunk.

 

On top of this, in a Windows environment NTFS is formatted in blocks ranging from 1MB to 8MB.

 

The file system used by the guest operating system optimizes I/O by grouping sectors into socalled clusters (allocation units).

 

Figure 1 shows that an unaligned structure may cause many additional I/O operations when only one cluster is ready by the guest operating system.

 

unaligned.png

 

Figure 2 shows I/O improvements on a properly aligned Windows NTFS volume in a VMDK on a SAN LUN.

 

aligned.png

 

Also, operating systems on x86 architectures create partitions with a master boot record (MBR) that consumes 63 sectors. This is due to legacy BIOS code from the PC that used cylinder, head, and sector addressing instead of logical block addressing (LBA). Without LBA, the first track is reserved for the boot code, and the first partition starts at cylinder 0, head 1, and sector 1. This is LBA 63 and is therefore unaligned.

 

An unaligned partition results in a track crossing and an additional I/O, incurring a penalty on latency and throughput. The additional I/O (especially if small) can impact system resources significantly on some host types. An aligned partitions ensures that the single I/O is serviced by a single device, eliminating the additional I/O and resulting in overall performance improvement.

 

During ESX Server 3.0 installation, however, the installation procedure creates a default VMware VMFS partition that is unaligned. Administrators should consider manually aligning the default VMware VMFS partition with fdisk before use.

Read the complete article on >> http://viops.vmware.com/home/docs/DOC-1407






, , , ,

Keine Kommentare: