June 16, 2015

Disk Shares

Disk shares

"Proportional share" method.

If multiple VMs access the same VMFS datastore and the same logical unit number (LUN), there may be contention as they try to access the same virtual disk resource at the same time. Under certain conditions, the administrator may need to prioritize disk access for specific virtual machines; this can be done using disk shares.

If you want to give priority to specific VMs when there is access contention, you can do so using disk shares.

Using disk shares, the administrator can ensure that the more important virtual machines get preference over less important virtual machines for I/O bandwidth allocation.

“Shares is a value that represents the relative metric for controlling disk bandwidth to all virtual machines. The values are compared to the sum of all shares of all virtual machines on the server.”

“Disk shares are relevant only within a given host. The shares assigned to virtual machines on one host have no effect on virtual machines on other hosts.”

Disk shares control the I/O operations per second (IOPS) that the virtual disk is allowed to take from the physical resource. The values are Low, Normal, High, or Custom, with the following relative share values:
  • High:  2,000 shares
  • Normal:  1,000 shares
  • Low:  500 shares
The more “shares” a virtual machine is assigned, the more priority it will have for access to the physical disk resource, when there is contention.

To allocate the host disk’s I/O bandwidth to the virtual hard disk of a virtual machine via vSphere Web Client:

1 Right-click a virtual machine in the inventory and select Edit Settings.
2 On the Virtual Hardware tab, expand Hard disk to view the disk options.
3 In the Shares drop-down menu, select a value for the shares to allocate to the virtual machine.
4 If you selected Custom, enter a number of shares in the text box.
5 In the Limit - IOPs box, enter the upper limit of storage resources to allocate to the virtual machine, or selectUnlimited.
6 Click OK.

Reference:

Virtual Machine Storage Policies

VM Storage Policies

Virtual machine storage policies enable the administrator to define storage requirements for the virtual machine and determine:
  • Which storage/datastore is provided for the virtual machine
  • How the virtual machine is placed within the storage
  • Which data services are offered to the virtual machine
Storage policies define the storage requirements for the virtual machine, or more specifically, they define the storage requirements for the applications running in the virtual machine. Applying a storage policy to a virtual machine determines whether or not the datastore meets all the requirements of the VM as defined by the storage policy.

Storage policies identify the appropriate storage to use for a given virtual machine.

“In software-defined storage environments, such as Virtual SAN and Virtual Volumes, the storage policy also determines how the virtual machine storage objects are provisioned and allocated within the storage resource to guarantee the required level of service.”

“The virtual machine home files (.vmx, .vmsd, .nvram, .log, and so on) and the virtual disks (.vmdk) can have separate storage policies.”

As of vSphere 5.5 virtual machine storage profiles are called virtual machine storage policies.
Storage Policy are based on SLA, performance, and other metrics which are used during provisioning, cloning, Storage vMotion, and Storage DRS. It leverages VASA for metrics and characterization and supports all arrays in the hardware configuration list, regardless of whether they’re NFS, iSCSI, or FC. It also enables compliance status reporting in vCenter.

VMware vStorage APIs – Storage Awareness (VASA) is an API that allows vSphere visibility into the storage array to query storage configurations and to set storage properties for compliant arrays.
VASA is a set of APIs that a storage vendor can use to advertise information about their storage array. VASA can advertise that an array volume is a RAID-5 disk set, its health status, and whether any disks in the LUN have failed.

“Storage vendors use VASA to provide vSphere with information about specific disk arrays for tighter integration between storage and the virtual infrastructure. The shared information includes details on storage virtualization, including health status, configuration, capacity and thin provisioning.”

The goal of VASA is to enable storage array to advertise its capabilities. Applications such as vCenter can query the APIs and use the result to define VM storage policies. VASA provides vCenter visibility into the storage array and expose informationn on array features such as:
  • Snapshot
  • Deduplication
  • Replication state
  • RAID levels
  • Disk provisioning
And status information such as:
  • Health
  • Alerts
Using Storage Policies, storage capabilities can be described in terms of Capacity, Performance, Fault tolerance, Replication etc. These capability information is provided either by the storage vendor via “vSphere Storage APIs – Storage Awareness” or VASA or is manually defined by the administrator as user-defined tags.

Capabilities are attributes of the storage. They are accessed via VASA or from user defined tags.
Profiles describe what capabilities a virtual machine requires for storage. If a datastore meets all the requirements of a VM or virtual disk, it is said to be compliant with the VM.

Using Policy-Driven Storage, various storage characteristics, can be specified in a virtual machine storage policy. These policies are used during provisioning, cloning and Storage vMotion to ensure that only those datastores or datastore clusters meet the VM’s storage policy requirements are used. It leverages VASA for array charactrization and requires an enterprise plus license.

Policy-Driven Storage allows storage tiers to be defined in vCenter.

Policy-driven storage allows a vSphere administrator to create storage policies that describe the storage requirements for a VM in terms of storage attributes and capabilities. Storage policies simplify the process of choosing datastores that meet the storage requirements of a virtual machine.

“Once a VM is up and running, vCenter monitors and sends an alert if a VM happens to be in breach of the assigned storage policy."

Reference:

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: