PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven...

36
PAC485 Managing Datacenter Resources Using the VirtualCenter Distributed Resource Scheduler Carl Waldspurger Principal Engineer, R&D

Transcript of PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven...

Page 1: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

PAC485Managing Datacenter Resources

Using the VirtualCenter Distributed Resource Scheduler

Carl WaldspurgerPrincipal Engineer, R&D

Page 2: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

This presentation may contain VMware confidential information.

Copyright © 2005 VMware, Inc. All rights reserved. All other marks and names mentioned herein may

be trademarks of their respective companies.

Page 3: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Talk Overview

Context and featuresManaging resourcesVirtual machine placementSystem architectureSummary

Page 4: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

What Is DRS?DRS = Distributed Resource SchedulerAutomatic virtual machine placement

Optimize load balance across hostsDecide if, when, and where to migrateReact to dynamic load changes

Cluster-wide resource managementScalable resource controlsConfigurable automation levelsIntegrated UI for all controls

Page 5: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

DRS Can Help You…

Manage variable loadsWorkloads often dynamic, time-dependentQuickly shift loads in response to demand

Administer many virtual machinesHierarchical organizationDelegated administration

Move towards utility computingThink more about aggregate resource poolsThink less about individual hosts

Page 6: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Where Does DRS Fit In?

New productRequires VirtualCenter 2 and ESX Server 3Modular plug-in for VirtualCenter

DRS moduleImplements algorithms, enforces policiesManaged using VirtualCenter UI

Leverages core technologiesVMotion for migrating live VMs across hostsSophisticated resource management

Page 7: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Key FeaturesVirtual machine placement

Choose initial host when VM powers onDynamic rebalancing using VMotion

Configurable automation levelsManual – recommend initial host and migrationsPartial – automatic initial host, recommend migrationsFull – automatic initial host and migrations

Resource poolsFlexible grouping, sharing, and isolationHierarchical organization and delegation

Page 8: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Talk Overview

Context and featuresManaging resourcesVirtual machine placementSystem architectureSummary

Page 9: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Managing ResourcesBasic controls

Same as in current products Shares – specify relative importanceMin – guaranteed resource availabilityMax – limit resource consumption

Resource poolsNew feature leveraged by DRS Hierarchical management

Page 10: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Basic Control: SharesImportance

Entitlement directly proportional to sharesAnalogy: shares of stock in corporation

Relative unitsAbstract number, only ratios matterEntitlement depends on total shares issued

Named valuesPredefine high, normal, low with 4 : 2 : 1 ratioDefaults to normal

Page 11: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Shares Examples

Change shares forvirtual machineDynamic reallocation

Add virtual machine, overcommit resourcesGraceful degradation

Remove virtual machineExploit extra resources

Page 12: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Basic Control: MinGuaranteed resources

Minimum service level reservationEven when system overcommitted

Absolute unitsMHz for cpu, MB for memoryDefaults to zero for cpu, memory

Virtual machine admission controlReserve resources for minsSum of all VM mins ≤ capacityPrevent power-on if check fails

Page 13: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Min ExampleTotal capacity

600 MHz reserved400 MHz available

Admission control2 VMs try to power-on300 MHz min eachUnable to admit both

VM1 powers onVM2 not admitted

VM1VM1 VM2VM2

Page 14: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Basic Control: MaxResource limit

Upper bound on consumptionEven when system undercommitted

Absolute unitsMHz for CPU, MB for memoryDefaults to “unlimited” for cpuDefaults to guest RAM size for memory

Page 15: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Max ExampleCurrent utilization

600 MHz active400 MHz idle

Start CPU-bound VM200 MHz maxExecution throttled

New utilization800 MHz active200 MHz idleVM prevented fromusing idle resources

VMVM

Page 16: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Resource EntitlementsResources that each VM “deserves”

Combining shares, min, and maxAllocation primarily based on sharesConstrained by min and max

What if VM idles?Don’t give VM more than it demandsResources redistributed to active VMsUnused mins not wasted

Page 17: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Resource PoolsMotivation

Allocate aggregate resources for sets of VMsIsolation between pools, sharing within poolsFlexible hierarchical organizationAccess control and delegation

What is a resource pool?Named object in VirtualCenter inventoryAccess control permissionsMin, max, and shares for both CPU and memoryParent pool, child pools and VMs

Page 18: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Resource Pools ExampleAdmin manages usersPolicy: Alice’s share50% more than Bob’sUsers manage own virtual machines Not shown: min, maxVM allocations:

Bob

200 Admin

VM3

400 Bob

Alice300 Admin

75 Alice 75 Alice

Admin

30%

30%

40%

VM2VM1

Page 19: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Example: Bob Adds Virtual MachineSame policyPools isolate usersAlice still gets 50%more than BobVM allocations:

Bob

200 Admin

400 Bob

Alice300 Admin

75 Alice 75 Alice

Admin

800 Bob

30%

30% 13%

27%VM3VM2VM1 VM4

Page 20: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Resource Pool Admission ControlPool admission control

Same check as before, at pool levelSum of mins for pool children ≤ pool capacityWhen create pool, power-on VM, change settings

Growable Min optionDynamically request more capacity from parentSimplifies policies where hard partitions too rigid

Page 21: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Resource Pools UI

Page 22: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Delegated AdministrationCluster administrator

Default pool contains all cluster resourcesAggregate cpu and memory capacity of all hostsCarves up cluster resources into poolsProvides bulk allocations to pool administrators

Pool administratorPool may reflect department, project, client, etc.Carves up pool resources into smaller pools for users

End userAllocates resources from personal pool to virtual machinesView restricted to personal pool hierarchy

Page 23: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Best PracticesUse Mins and Shares appropriately

Shares generally more flexible policy toolUse shares to isolate without hard partitioningUse mins to guarantee acceptable service

Maintain some spare capacityDon’t use mins that commit entire clusterSlack for maintenance, rebalancingNeeded to tolerate host failures

Page 24: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Talk Overview

Context and featuresManaging resourcesVirtual machine placementSystem architectureSummary

Page 25: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Virtual Machine PlacementGoals

Balance virtual machine load across hosts in clusterEnforce resource policies accuratelyRespect placement constraints

Dynamic balancingMonitor key virtual machine, pool, and host metricsDeliver entitled resources to pools and VMsRecommend migrations (prioritized list)

Initial placementPower on virtual machine in resource poolRecommend host (prioritized list)

Page 26: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Placement ConstraintsVMotion compatibility

Processor typeSAN and LAN connectivity

Anti-affinity rulesRun virtual machines on different hostsMotivation: high-availability, clustering

Affinity rulesRun virtual machines on same hostMotivation: locality, performance benefits

Page 27: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Dynamic BalancingWhat to balance?

Load, adjusted for resource entitlementLoad = utilization, if all VMs equally important

When to balance?Re-evaluate every few minutesChanges to pool or VM settingsAdd or remove host

AggressivenessMigration rate, recommendation strengthDepends on severity of imbalance

Page 28: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Balancing DetailsCompute virtual machine entitlements

Based on pool and virtual machine resource allocationsDon’t give virtual machine more than it demandsReallocate extra resources fairly

Compute host loadsSum entitlements for virtual machines on hostNormalize by host capacity

Consider possible VMotionsEvaluate effect on cluster balanceEvaluate migration cost for involved hosts

Recommend best moves (if any)

Page 29: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Dynamic Balancing UI

Page 30: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Initial Placement UI

Page 31: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Best PracticesFollow strong recommendations

Otherwise balance and fairness may deteriorateSome VMotion is necessary

Enable automationChoose default based on environment, comfort levelUse per-VM automation level overridesLet DRS autonomously manage most VMsCan keep human in loop for critical VMs

Page 32: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

Talk Overview

Context and featuresManaging resourcesVirtual machine placementSystem architectureSummary

Page 33: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

System Architecture Overview

VirtualCenter

clients

DB

cluster n

•••cluster 1

••• •••

stats + actions

SDKUI

DRS

DRS1

n

•••

Page 34: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

System Architecture ConstraintsCluster size

LAN, not WANUp to 32 hosts per clusterHost capacities may differ significantly

Time scaleMinutes, not millisecondsVMotion VM downtime ≈ milliseconds,but end-to-end latency ≈ tens of seconds Migrate VM infrequently ≈ minutes to hours

Algorithm performanceMilliseconds, not minutesOperations occur at human time scale

Page 35: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero

SummaryAutomatic virtual machine placement

Recommendations or full automationInitial placement at virtual machine power-onDynamic load balancing

Powerful resource controlsFlexible cluster-wide policiesHierarchical resource poolsVirtual machine affinity rules

Future directionsIntegrated I/O bandwidth managementDetect longer-term trends, proactive migration

Page 36: PAC485 Managing Datacenter Resources Using the ...download3.vmware.com/vmworld/2005/pac485.pdfEven when system overcommitted Absolute units MHz for cpu, MB for memory Defaults to zero