25
VMware storage concepts, APIs and performance best practices Aditya Vasudevan Patni Americas, Inc

VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

Embed Size (px)

Citation preview

Page 1: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

VMware storage concepts, APIs and performance best practices

Aditya Vasudevan

Patni Americas, Inc

Page 2: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Agenda

Basic VMware Storage concepts

Storage best practices in ESX

Storage APIs in VMware

Q&A

2

Page 3: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Virtual Machine is a file

3

Page 4: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

SAN storage virtualization

4

Page 5: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

VMware disk options

5

Page 6: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Sharing VMFS across hosts

6

Page 7: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Snapshots

VMFS feature Instant snap Copy on write Basis of DP API

7

Page 8: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Linked clones

Many VMs share a disk Private write disk Updates on base disk

are seen by all VMs Improves storage

utilization & saves cost.

8

Page 9: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Importance of SAN for ESX

These features depend on some external storage: vMotionHigh AvailabilityDistributed Resource SchedulingDR using Site Recovery Manager

9

Page 10: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Some best practices

Each LUN should have the correct RAID level and storage characteristic for applications in virtual machines that use it.

One LUN must contain only one VMFS datastore. If multiple virtual machines access the same VMFS,

use disk shares to prioritize virtual machines. Few large LUNs or many small LUNs ? For multipathing to work properly, each LUN must

present the same LUN ID number to all ESX/ESXi hosts.

10

Page 11: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Best practices

Make sure the driver you use in the guest operating system specifies a large enough queue. You can set the queue depth for the physical HBA during system setup.

On virtual machines running Microsoft Windows, increase the value of the SCSI TimeoutValue parameter to 60. This increase allows Windows to better tolerate delayed I/O resulting from path failover.

11

Page 12: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Best practices

You cannot use virtual machine multipathing software to perform I/O load balancing to a single physical LUN.

When you use VMotion or DRS with an active/passive SAN storage device, make sure that all ESX/ESXi systems have consistent paths to all storage processors. Not doing so can cause path thrashing when a VMotion migration occurs.

12

Page 13: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Best practices

The RAID group containing the ESX/ESXi LUNs should not include LUNs used by other hosts that are not running ESX/ESXi for I/O intensive applications.

Enable array cache Use multi-pathing for static load balancing Adjust LUN queue depth Align Partition for VMFS and guest FS.

13

Page 14: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Best practices

SIOC Ensure CPU cycles are available for disk IO Choose right disk adapter – LSI/pvscsi Meta-data intensive operation at off peaks hours Adjust Disk.SchedNumReqOutstanding Independent nonpersistent disk /Snapshot incur

performance penalty Thick eager zeroed disks are better than lazy zero or

thin disk

14

Page 15: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

What is Path thrashing ?

15

Page 16: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Path thrashing - causes

Array is of type Active-passive. Two hosts access the same LUN using different

storage processors (SPs). For example, the LUN is configured to use the Fixed PSP. On Host A, the preferred path to the LUN is set to use a path through SP A. On Host B, the preferred path to the LUN is configured to use a path through SP B.

16

Page 17: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Path thrashing - resolution

Ensure that all hosts sharing the same set of LUNs on the active-passive arrays use the same storage processor.

Correct any cabling inconsistencies between different ESX/ESXi hosts and SAN targets so that all HBAs see the same targets in the same order.

Configure the path to use the Most Recently Used PSP (the default).

17

Page 18: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

vStorage APIs

Data protection PSA VAAI

18

Page 19: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

vStorage API – Data Protection

Thin Provisioning SupportOnly backup the “occupied” portion of a thin

provisioned diskThis automatically removes the 0 byte blocks that

haven’t been allocated yet Discovery of changed dataNo more “snap and scan” –vStorage APIs allow

vendors to identify changed data blocksNear continuous replication

19

Page 20: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

vStorage API - PSA

20

Page 21: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

vStorage API – Array Int – Full copy

Full copy enables the storage arrays to make full copies of data within the array without having the ESX server read and write the data.

Copy is faster – storage vMotion/cloning/deploying VM from template

Avoids CPU consumption on the host Avoids network congestion Avoids Storage front-end controller IO.

21

Page 22: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

vStorage API – Array Int – Block Zero

To have the array complete zeroing out of a disk speeds up a standard initialization process using the copy same primitive.

E.g. Creation of eager zero thick disk is faster Without this primitive zeroing is a time consuming

blocking operation

22

Page 23: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

vStorage API – Array Int – Locking

Hardware assisted locking to protect VMFS meta data instead of scsi reservation

Its granular block level locking vs LUN level scsi reservation

Results in better IO performance with administrative activities in parallel (VM creation, snapshots, etc)

23

Page 24: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Conclusions

ESX has powerful storage capabilities

Can achieve good performance through best practices

Opportunities to use APIs for integration

24

Page 25: VMware storage concepts, APIs and performance best practices · PDF fileVMware storage concepts, APIs and performance best practices ... Basic VMware Storage concepts Storage best

2010 Storage Developer Conference. Patni Americas, Inc. All Rights Reserved.

Q&A

25