Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Resource Management for ESX Server I
Russ HenmiTechnical Trainer
VMware, [email protected]
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Objectives
To understand the mechanisms used automatically inside ESX Server to allocate and optimize resources
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Systems for Optimizing Resource Use
Virtual Switch with Teamed NICs
Maximum Size
Virtual SMP
Virtual Machine Owner
Share Allocation
Share AllocationService console
Traffic Shaping
Share Allocation
Minimum SizeShare Allocation
Page SharingvmmemctlUse of VMkernel swap
Minimum RateMaximum RateProcessor AffinityShare Allocation
Load BalancingHyperthreadingVirtual
machine
Virtual Machine Administrator
VMkernel
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
VMkernel CPU Load BalancingSingle VCPU virtual machine runs on only one physical CPU at a timeDual VCPU virtual machine runs on two physical CPUs at a time, or noneVMkernel dynamically schedules virtual machines and Service Console
Every 20 milliseconds, VMkernel looks for virtual machines to migrateService Console always runs on CPU 0
CPU 0 CPU 1 CPU 2 CPU 3
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
HyperthreadingHyperthreading allows one Xeon or P4 to execute two threads simultaneously
Each physical CPU offers two logical CPUs (“LCPUs”)VMkernel will intelligently schedule VCPUs onto LCPUs
CPU-intensive VCPUs will run in different PCPUs
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
VMkernel Memory TechniquesAllow RAM over-commitment
VMkernel swap is reserved whenever a virtual machine's maximum RAM exceeds its minimum RAM
Economize on memoryTransparent Page Sharing allows pages with identical contents tobe stored only onceAlways active unless administratively disabled
Deallocate memory from one virtual machine for another Ballooning mechanism forces virtual machines to use their own paging areasActive when memory is scarce
Page virtual machine memory out to diskUse of VMkernel swap space is the last resort, performs poorly
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Transparent Page SharingShare identical pages
Copy detection algorithmExample: more than 30% shared w/ idle Win2K virtual machines
No changes to guest OS required
Copy-on-write (“COW”)Read-only when sharedPrivate copies after write
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
vmmemctl: The Memory Control MechanismDeallocate memory from selected virtual machines when RAM is scarce
inflate balloon (driver demands
memory from guest OS)
guest is forced to page out;
VMkernelreclaims memory
guest may page in; ESX Server grants memorydeflate balloon
(driver relinquishes memory)
ample memory;balloon remains
uninflated
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Virtual Machine Administrator ToolsYou can manage all virtual machines’resources through:
VMware Management Interface (MUI)Must log in as user root
VirtualCenter clientMust be a virtual machine administrator user
/proc/vmwareVMware Scripting API
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
How Virtual Machines Compete for ResourcesProportional-share system for relative resource management
Applied during resource contentionPrevents virtual machines from monopolizing resourcesGuarantees predictable resource shares
Change # Shares
Power on virtual machine
Power off virtual machine
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
CPU Resource Settings: Percentages and Shares
Minimum absolute percentageA percentage of a physical CPU reserved for this virtual machineThe VMkernel chooses which CPU, and may migrate
Maximum absolute percentageA cap on the consumption of CPU time by this virtual machine, as a proportion of a physical CPU
Range is 0-100% for uni virtual machinesRange is 0-200% for dual virtual machines
Because VCPUs in the same virtual machine are always co-scheduled
Proportional shares (relative)More shares means that this virtual machine will win competitions for CPU time more often
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Managing Processor SchedulingProcessor Affinity
To LCPUs if hyperthreading is enabledTo PCPUs otherwise
If you specify lists of physical CPUs for each virtual CPU, there must be no overlapDo not try to force both virtual CPUs of an SMP virtual machine to the same physical CPU
MUI VirtualCenter
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Memory Resource SettingsMaximum absolute size
Maximum memory that this virtual machine can use
Minimum absolute size
Guaranteed physical memory during contention
Proportional shares (relative)
In contention, virtual machines win in proportion to their proportion of the competing shares
Across entire system:Sum of all virtual machines’ (maximum -minimum) must be less than VMkernel swapSum of all virtual machines’ minimum RAM must be less than VMkernel RAM
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Virtual Machine Memory Admission Control
Virtual machines power on only if:Minimum memory available (by default, half the memory size)Enough swap space to cover difference between max and min size
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Viewing Memory Utilization
At least minimum memory size
At least maximum minus minimum memory size
For virtual machine being powered on:
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Disk Bandwidth ManagementProportional shares per LUN
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Controlling Network Bandwidth in ESX Server
Limits outbound network bandwidthHard limit: applies even when more bandwidth is available
Average rate, peak rate, burst size per virtual machine
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Service Console CPU SharesThe service console uses by default:
2000 CPU shares8% guaranteed minimum CPU usage
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Service Console Disk SharesShares for each physical disk used by the Service Console on an adapter shared with the VMkernel, if any
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
SummaryProportional Share Mechanism
Used to allocate CPU, Memory, Disk BandwidthTo govern CPU utilization
Allocate shares, specify minimum and maximum ratePossibility to use Virtual SMPRestrict virtual machines to physical CPUs
To govern memory allocationSpecify minimum and maximumBe sure to install VMware Tools (for the balloon driver)If over-commitment is desired, configure VMkernel swap
Not the same as Service Console swap space!
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
Questions?
Derived from VMware Education Services ‘Virtual Infrastructure’See http://www.vmware.com/services/education.html for course schedule
PAC879: The Next Phase of Virtual Infrastructure: Introducing ESX Server 3.0 and VirtualCenter 2.0
PAC177: Distributed Availability Services ArchitecturePAC484: Consolidated Backup with ESX Server:
In-Depth ReviewPAC485: Managing Data Center Resources Using the
VirtualCenter Distributed Resource SchedulerPAC532: iSCSI and NAS in ESX Server 3
This presentation covers the current versions of our products. Details about
future releases of our products are available in select sessions at VMworld, including: