Upload
mohammed-adnan-khan
View
214
Download
0
Embed Size (px)
Citation preview
7/29/2019 performancemonitoring-100409184324-phpapp01
1/98
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Developing Performance Monitoring Tools UsingvSphere APIs: Techniques and Best Practices
TEXIBP 1005
Balaji Parimi & Ravi Soundararajan, VMware Inc.
7/29/2019 performancemonitoring-100409184324-phpapp01
2/98
2Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at htt
p://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
This session may contain product features that are currently underdevelopment.
This session/overview of the new technology represents nocommitment from VMware to deliver these features in any generally
available product.
Features are subject to change, and must not be included incontracts, purchase orders, or sales agreements of any kind.
Technical feasibility and market demand will affect final delivery.
Pricing and packaging for any new technologies or featuresdiscussed or presented have not been determined.
These features are representative of feature areas under development. Feature commitments
are subject to change, and must not be included in contracts, purchase orders, or salesagreements of any kind. Technical feasibility and market demand will affect final delivery.
Disclaimer
7/29/2019 performancemonitoring-100409184324-phpapp01
3/98
3Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at htt
p://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
t
LinkedinSearch forVMware Partner Network
Follow Us
TwitterSearch forVMware_Partners
FacebookSearch forVMware Partner Network
http://blogs.vmware.com/powerofpartnership/
Help us help you! Please fill out the surveyat the end of the course.
Join the conversationGet the latest scoopBe a part of the network
Subscribe to RSS
Follow this event LIVE!#VMwarePEX2010
7/29/2019 performancemonitoring-100409184324-phpapp01
4/98
4Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Who is our Target Audience?
System Administrators: Monitor the performance of their virtual infrastructure
Understand the bottlenecks in the datacenter to help reconfigure their storageor network topology
Plan for future growth in the datacenter
VMware ISV Partners:
Collect the relevant/important performance counters and hand them off to aperformance analysis tool
Create a wizard/tool that helps system administrators troubleshoot theirdatacenter
7/29/2019 performancemonitoring-100409184324-phpapp01
5/98
5Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Agenda
Use Cases
Building a Performance Monitoring Application
Q & A
7/29/2019 performancemonitoring-100409184324-phpapp01
6/98
6Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Use Cases
Use Cases: What do I look for and why? CPU
Memory
Disk
Network
7/29/2019 performancemonitoring-100409184324-phpapp01
7/98
7Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
CPU
ESX is designed to run Virtual MachinesSchedulable entity = world
Virtual Machines are composed of worlds (mks, vCPUs)
Service Console (agents like vpxa, hostd) (Classic ESX)
Proportional-share scheduler for resource management Limits, Shares, and Reservations
World states (simplified view):
ready = ready-to-run but no physical CPU free
run = currently active and running
wait = blocked on I/O
7/29/2019 performancemonitoring-100409184324-phpapp01
8/98
8Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
So, How Do I Spot CPU Performance Problems?
One common issue is high CPU ready time High ready time possible contention for CPU resources among VMs
Many possible reasons
CPU over commitment (high %rdy + high %used)
Workload variability
Limit set on VM
No fixed threshold, but > 20% for a VCPUInvestigate further
7/29/2019 performancemonitoring-100409184324-phpapp01
9/98
9Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
CPU: Useful Metrics
Per-Host
Metric (Client) Metric
(esxtop)
Metric (sdk) Description
Usage (%) %USED cpu.usage.average CPU used overthe collectioninterval (%)
Usage (MHz) n/a cpu.usagemhz.average CPU used overthe collectioninterval (MHz)
7/29/2019 performancemonitoring-100409184324-phpapp01
10/98
10Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
CPU: Useful Metrics
Per-VM
Metric (Client) Metric(esxtop)
Metric (SDK) Description
Usage (%) %USED cpu.usage.average CPU used overthe collectioninterval
Used (ms) %USED cpu.used.summation CPU used overthe collectioninterval)*
Ready (ms) %RDY cpu.ready.summation CPU time spentin ready state*
Swap wait time(ms) [ESX4.0
hosts]
%SWPWT cpu.swapwait.summation CPU time spentwaiting for host-
level swap-in
* Units different between esxtop and vSphere client
7/29/2019 performancemonitoring-100409184324-phpapp01
11/98
11Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Spotting CPU Overcommitment in esxtop
2-CPU box, but 3 active VMs (high %used)
High %rdy + high %used can imply CPU overcommitment
7/29/2019 performancemonitoring-100409184324-phpapp01
12/98
12Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Caveat on Ready Time: Workload Variability
Ready time < used time
Used time
Ready time ~ used time
Some caveats on ready time
Used time ~ ready time: may
signal contention. However,might not be overcommitteddue to workload variability
In this example, we haveperiods of activity and idleperiods: CPU isntovercommitted all the time
(screenshot from VI Client)
7/29/2019 performancemonitoring-100409184324-phpapp01
13/98
13Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Further ready time examination
High Ready TimeHigh MLMTD: there is a limit on this VM
High ready time not always because of overcommitmentWhen you see high ready time, double-check if limit is set
7/29/2019 performancemonitoring-100409184324-phpapp01
14/98
14Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Further Ready Time Investigation: No Fixed ThresholdWhy?
ESX 1 ESX 2
vSphereVM
Probe VM vSphereDB
ODBC
Sniff
traffic
vSphere communicates with DBProbe VM monitors vSphere-to-DB traffic
The more traffic, the more work done by Probe VM
7/29/2019 performancemonitoring-100409184324-phpapp01
15/98
15Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Why Isnt There A Fixed Ready Time Threshold?
Ready time jump from 12.5% (idle DB) to 20% (busy DB) didntnotice until responsiveness suffered!
7/29/2019 performancemonitoring-100409184324-phpapp01
16/98
16Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Summary of Possible Reasons for High Ready Time
CPU overcommitment Possible solution: add more CPUs or VMotion the VM
Workload variability
A bunch of VMs wake up all at once
Note: system may be mostly idle: not always overcommitted
Limit set on VM
4x2GHz host, 2 vcpu VM, limit set to 1GHz (VM can consume 1GHz)
Without limit, max is 2GHz. With limit, max is 1GHz (50% of 2GHz)
CPU all busy: %USED: 50%; %MLMTD & %RDY = 150% [total is 200%, or 2CPUs]
7/29/2019 performancemonitoring-100409184324-phpapp01
17/98
17Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Where do we go from here?
Use Cases: What do look for and why CPU
Memory
Disk
Network
7/29/2019 performancemonitoring-100409184324-phpapp01
18/98
18Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Memory
ESX must balance memory usage for all worlds Virtual machines, Service Console, and vmkernel consume memory
Page sharing to reduce memory footprint of Virtual Machines
Ballooning to relieve memory pressure in a graceful way
Host swapping to relieve memory pressure when ballooning insufficient
ESX allows overcommitment of memory
Sum of configured memory sizes of virtual machines can be greater thanphysical memory if working sets fit
7/29/2019 performancemonitoring-100409184324-phpapp01
19/98
19Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Ballooning vs. Swapping (1)
Ballooning: Memctl driver grabs pages and gives to ESX Guest OS choose pages to give to memctl (avoids hot pages if possible): either
free pages or pages to swap
- Unused pages are given directly to memctl
- Pages to be swapped are first written to swap partition within guest OS and then given to
memctl
VM1
Swap partition w/inGuest OS
ESX
VM2
memctl
1. Balloon
2. Reclaim
3. Redistribute
F
7/29/2019 performancemonitoring-100409184324-phpapp01
20/98
20Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Ballooning vs. Swapping (2)
Swapping: ESX reclaims pages forcibly Guest doesnt pick pagesESX may inadvertently pick hot pages (possible VM
performance implications)
Pages written to VM swap file
VM1
SwapPartition(w/in guest)
ESX
VM2
VSWP(external to guest)
1. Force Swap2. Reclaim
3. Redistribute
7/29/2019 performancemonitoring-100409184324-phpapp01
21/98
21Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Ballooning vs. Swapping (3)
Bottom line: Ballooning may occur even when no memory pressure just to keep memory
proportions under control
Ballooning is vastly preferably to swapping
Guest can surrender unused/free pages- With host swapping, ESX cannot tell which pages are unused or free and may accidentally pick
hot pages
Even if balloon driver has to swap to satisfy the balloon request, guest chooses what
to swap
- Can avoid swapping hot pages within guest
7/29/2019 performancemonitoring-100409184324-phpapp01
22/98
22Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Ok, So Why Do I Care About Memory Usage?
If running VMs consume too much host memory Some VMs do not get enough host memory
This forces either ballooning or host swapping to satisfy VM demands
Host swapping or excessive ballooning reduced VM performance
If I do not size a VM properly (e.g., create Windows VM with 128MBRAM)
Withinthe VM, swapping occurs, resulting in disk traffic
VM may slow down Butdont make memory too big! (High overhead memory)
7/29/2019 performancemonitoring-100409184324-phpapp01
23/98
23Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Important Memory Metrics (Per VM)
One rule of thumb: > 1MB/s swap in or swap out rate may meanmemory overcommitment
Metric (Client) Metric
(esxtop)
Metric (SDK) Description
Swap in rate
(ESX4.0 Hosts)
SWR/s mem.swapinRate.average Rate at which mem is
swapped in from disk
Swap out rate(ESX4.0 Hosts)
SWW/s mem.swapoutRate.average Rate at which mem isswapped out to disk
Swapped SWCUR mem.swapped.average (level 2counter)
~swap out swap in
Swap in(cumulative)
n/a mem.swapin.average Mem swapped in fromdisk
Swap out(cumulative)
n/a mem.swapout.average Mem swapped out todisk
7/29/2019 performancemonitoring-100409184324-phpapp01
24/98
24Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Important Memory Metrics (Per Host, sum of VMs)
One rule of thumb: > 1MB/s swap in or swap out rate may meanmemory overcommitment
Metric (Client) Metric
(esxtop)
Metric (SDK) Description
Swap in rate
(ESX4.0 Hosts)
SWR/s mem.swapinRate.average Rate at which mem is
swapped in from disk
Swap out rate(ESX4.0 Hosts)
SWW/s mem.swapoutRate.average Rate at which mem isswapped out to disk
Swap used SWCUR mem.swapused.average (level2 counter)
~swap out swap in
Swap in(cumulative)
n/a mem.swapin.average Mem swapped in fromdisk
Swap out(cumulative)
n/a mem.swapout.average Mem swapped out todisk
7/29/2019 performancemonitoring-100409184324-phpapp01
25/98
25Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Example of Swapping
Increased swap activity may be a sign of over-commitment
Lots of swapping
No swapping
7/29/2019 performancemonitoring-100409184324-phpapp01
26/98
26Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
A Stacked Chart (per VM) of Swapping
Lots ofswapping
No swapping
7/29/2019 performancemonitoring-100409184324-phpapp01
27/98
27Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Where do we go from here?
Use Cases: What do look for and why CPU
Memory
Disk
Network
7/29/2019 performancemonitoring-100409184324-phpapp01
28/98
28Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Disk Performance Problems 101
What should I look for to figure out if disk is an issue? Am I getting the IOPs I expect?
Am I getting the bandwidth (read/write) I expect?
Are the latencies higher than I expect?
Where is time being spent?
What are some things I can do?
Make sure devices are configured properly (caches, queue depths)
Use multiple adapters and multipathing
Check networking settings (for iSCSI/NAS)
7/29/2019 performancemonitoring-100409184324-phpapp01
29/98
29Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Useful Disk Metrics
Metric(Client)
Metric(Esxtop)
Metric (SDK) Description
Commands CMDS/s disk.commands.summation commands
issued in thesampling interval
Read rate MBREADS/s disk.read.average KB/s read*
Write rate MBWRTN/s disk.write.average KB/s written*
Device latency DAVG/cmd disk.deviceLatency.average Average latencyat device
Kernel latency KAVG/cmd disk.kernelLatency.average Average latencyin vmkernel
Command
latency
GAVG/cmd disk.totalLatency.average Total latency for
command
* Units different between esxtop and vSphere client
7/29/2019 performancemonitoring-100409184324-phpapp01
30/98
30Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Disk Performance Example: vSphere Client
SAN cache enabled:High Write Throughput
SAN cache disabled:Poor throughput
7/29/2019 performancemonitoring-100409184324-phpapp01
31/98
31Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Another Disk Example: Slow VM Power On
Trying to Power on a VM Sometimes, powering on VM would take 5 seconds
Other times, powering on VM would take 5 minutes!
Where to begin?
Powering on a VM requires disk activity on host Check disk metrics for host
7/29/2019 performancemonitoring-100409184324-phpapp01
32/98
32Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Lets look at the vSphere client
Max Disk Latencies range from 100ms to 1100msvery high! Why?(counter name: disk.maxTotalLatency.latest)
U i E E i Sl VM P O
7/29/2019 performancemonitoring-100409184324-phpapp01
33/98
33Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Using Esxtop to Examine Slow VM Power On
Note very large DAVG/cmd and GAVG/cmd
Rule of thumb: GAVG/cmd > 50ms = high latency!
What does this mean?
Latency when command reaches device is high
Latency as seen by the guest is high
Low KAVG/cmd: command isnt queuing in VMkernel
Whats up?
Hi h Di k L t M t S l d
7/29/2019 performancemonitoring-100409184324-phpapp01
34/98
34Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
High Disk Latency: Mystery Solved
Host events: disk has connectivity issues high latencies!
Bottom line: monitor disk latencies; issues may not be related tovirtualization!
A M C l Di k E l
7/29/2019 performancemonitoring-100409184324-phpapp01
35/98
35Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
A More Complex Disk Example
ESX
VM1 VM2 VM3 VM4 VM15
NAS
Ethernet
Disk Traffic
VMs communicate with NAS (network traffic)NAS writes to disk (disk traffic)
Combining Metrics: A More Complex Disk Example
7/29/2019 performancemonitoring-100409184324-phpapp01
36/98
36Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Combining Metrics: A More Complex Disk Example
Setup:
Group of Virtual Machines running on a host
Each Virtual Machine talks to a Virtual Machine serving as a NAS device
Problem:
Suddenly, I cannot log in to any of the Virtual Machines (really slow!)
Initial Speculation
Virtual Machines are saturated in some resource
A More Complicated Disk Example Part I (CPU)
7/29/2019 performancemonitoring-100409184324-phpapp01
37/98
37Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
A More Complicated Disk Example, Part I (CPU)
Predictable CPU usage,Host not saturated
Chaotic CPU usage,Host saturated
Complicated Disk Example Part 2: Disk Usage
7/29/2019 performancemonitoring-100409184324-phpapp01
38/98
38Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Complicated Disk Example, Part 2: Disk Usage
Uneven, reduced disk usage
Predictable, balanced disk usage
Complicated Disk Example Part 3: Write Rate
7/29/2019 performancemonitoring-100409184324-phpapp01
39/98
39Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Complicated Disk Example, Part 3: Write Rate
Increased write traffic, zero read traffic
Read and write traffic
Complicated Example: Putting it all Together
7/29/2019 performancemonitoring-100409184324-phpapp01
40/98
40Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Complicated Example: Putting it all Together
Each App Virtual Machine reads to & writes from same NAS
Something caused excessive writes from each Virtual Machine
Increased CPU usage per Virtual Machine
Increased write traffic per Virtual Machine
Ton of writes onNAS VM!
Issue
Bug in application within Virtual Machine caused error condition
Error condition caused excessive writes to same NAS
- Network traffic for application VMs, disk traffic on NAS VM
Each Virtual Machine is so busy writing that it never reads
Where do we go from here?
7/29/2019 performancemonitoring-100409184324-phpapp01
41/98
41Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Where do we go from here?
Use Cases: What do look for and why
CPU
Memory
Disk
Network
Network Performance Problems 101
7/29/2019 performancemonitoring-100409184324-phpapp01
42/98
42Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Network Performance Problems 101
What should I look for to figure out if network is an issue?
Am I getting the packet rate that I expect?
Am I getting the bandwidth (read/write) I expect?
Is all traffic on one NIC, or spread across many NICs?
[more advancednot available through counters]: out-of-order packets?
What are some things I can do?
Check host networking settings (full-duplex/half-duplex, 10Gig network vs
100Mb network?, firewall settings)
Check VM settings: all VMs on proper networks?
Useful networking metrics
7/29/2019 performancemonitoring-100409184324-phpapp01
43/98
43Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Useful networking metrics
Metric (Client) Metric(esxtop)
Metric (SDK) Description
Packets
transmitted (insampling interval)
PKTTX/s net.transmitted.average Packets
transmitted insampling interval
Packets received(in sampling
interval)
PKTRX/s net.received.average Packets receivedin the sampling
interval
Data transmitrate (KBps)
MbTX/s net.transmitted.average Amount of datatransmitted per
second*
Data receive rate
(KBps)
MbRX/s net.received.average Amount of data
received persecond*
* Units different between esxtop and vSphere client
Network Performance Troubleshooting
7/29/2019 performancemonitoring-100409184324-phpapp01
44/98
44Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Network Performance Troubleshooting
Customer complains about slow network
Shes running netperf on a GigE Link
She sees only 200Mbps
Why? I bet its that VMware stuff!!
- Note to reader: Please dont blame VMware first
Where do we start?
Where do we begin? Check VM Bandwidth.
7/29/2019 performancemonitoring-100409184324-phpapp01
45/98
45Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
b g
Measure VM Bandwidth (net.transmitted.average)
200 Mb/s
Screenshot from the vSphere client
Check Host Bandwidth
7/29/2019 performancemonitoring-100409184324-phpapp01
46/98
46 Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Measure Host Bandwidth (net.transmitted.average)
Host sees around 900Mbpswhy is VM at 200Mbps?
Hmmare we sharing this NIC with multiple VMs?
All VMs using same NIC (VM Network)
7/29/2019 performancemonitoring-100409184324-phpapp01
47/98
47 Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
All VMs using VM Network and sharing 1 physical NIC
All Traffic is Going Through One Nic!
7/29/2019 performancemonitoring-100409184324-phpapp01
48/98
48 Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Measure per-physical-NIC traffic
Hmmall VM traffic is going through 1 NIC
Lets split the VMs across NICs
All traffic through one
NIC on this host
Split VMs Across Multiple NICs. Bingo!
7/29/2019 performancemonitoring-100409184324-phpapp01
49/98
49 Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
So Complicated! Where do I begin?
7/29/2019 performancemonitoring-100409184324-phpapp01
50/98
50 Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
So much to track
But I have different needs! For example
What if I want esxtop for multiple VMs at once?
7/29/2019 performancemonitoring-100409184324-phpapp01
51/98
51 Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMwareproducts are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
vTop: A stats display similar to esxtop, but showing multiple metrics per VM in onescreen
What if I want to see if DRS is working?
7/29/2019 performancemonitoring-100409184324-phpapp01
52/98
52Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Highlight the effectiveness of DRS by overlaying stats and events data
What if I Want to Compare Guest/Host Metrics on One Chart?
7/29/2019 performancemonitoring-100409184324-phpapp01
53/98
53Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Overlay stats data from the ESX and the GOS
What If I Want To Compare the Throughput of 2 RPs?
7/29/2019 performancemonitoring-100409184324-phpapp01
54/98
54Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Aggregate stats data by resource pools, clusters, group of VMs(Windows, Linux),vApps, etc.
Sounds Greatbut how do I do this stuff?
7/29/2019 performancemonitoring-100409184324-phpapp01
55/98
55Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Basic Steps
1. Collect the Stats you Need
2. Interpret the Stats
3. Present the stats
Observations
1. Stats collection is similar across customer environments
2. Interpretation/Presentation is specific to customer
Stats collection is a major pain point
1. For customers: so many stats, complex API
2. For us: we get the same questions over and over again
Soweve created a reference application for Stats Collection
Agenda
7/29/2019 performancemonitoring-100409184324-phpapp01
56/98
56Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Use Cases
Building a Performance Monitoring Application
Q & A
Building a Performance Monitoring Application
7/29/2019 performancemonitoring-100409184324-phpapp01
57/98
57Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Monitoring Applications consist of a few standard parts:
Selecting entities to monitor (hosts, VMs, etc.)
Selecting metrics to monitor (CPU, Memory, etc.)
Choosing collection frequency
Keeping abreast of inventory changes
Collecting stats
Presenting data in a meaningful way
StatsFeeder: A Reference Monitoring Application
7/29/2019 performancemonitoring-100409184324-phpapp01
58/98
58Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Present data in a meaningful way
Collect statistics(note: many sources!)
Keep track of inventory changes
Select Entities andMetrics to monitorand set collection
frequency
A Brief Walkthrough of StatsFeeder
7/29/2019 performancemonitoring-100409184324-phpapp01
59/98
59Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
1. Select Entities/Metrics to Monitor
2. Keep Track of Inventory Changes
3. Collect Statistics
4. Present Statistics
Selecting Entities/Metrics to Monitor
7/29/2019 performancemonitoring-100409184324-phpapp01
60/98
60Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Relevant Modules in StatsFeeder
1. Counter Info Initializer
2. User Input Reader
3. Entity MoRef Retriever
4. Entity Metrics and Performance Provider Summary
Counter Info Initializer
7/29/2019 performancemonitoring-100409184324-phpapp01
61/98
61Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Retrieves available counters.
Tip:
Counter information is static:
retrieve only once.
Counter Info Initializer: Code Snippet
7/29/2019 performancemonitoring-100409184324-phpapp01
62/98
62Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
The PerformanceManager managed object contains a property with
the name perfCounter
It is an array of type PerfCounterInfo.
Use PropertyCollector to retrieve this property and get the
supported counters.
PropertySpec pSpec = new PropertySpec();
pSpec.setType(PerformanceManager);
pSpec.setPathSet(new String[]{perfCounter});
ObjectSpec oSpec = new ObjectSpec();
oSpec.setObj(serviceContent.getPerfManager());
User Input Reader
7/29/2019 performancemonitoring-100409184324-phpapp01
63/98
63Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Reads the configuration file for:
The entities for which the
performance statistics are being
retrieved.
Specify individual entities by name
Specify the name of the container andthe child type to monitor the entities in
that container
The performance statistics to
retrieve. The frequency at which the
performance data should be
retrieved.
User Input Reader: Sample Configuration File
7/29/2019 performancemonitoring-100409184324-phpapp01
64/98
64
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Entity MoRef Retriever
R i M R f f i i
7/29/2019 performancemonitoring-100409184324-phpapp01
65/98
65
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Retrieves MoRefs of entries in
configuration file.
Tricks:
MoRef does not change once an item is
added to the vCenter inventory.
MoRef does change if entity is removed
and re-added.
Therefore:
Maintain cache of MoRefs Monitor changes to the inventory
Use Views to retrieve MoRefs
Entity MoRef Retriever
R t i th M R f f i di id l titi i P t C ll t
7/29/2019 performancemonitoring-100409184324-phpapp01
66/98
66
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Retrieve the MoRef of individual entities using PropertyCollector or
SearchIndex.
Retrieve the MoRefs of entities in a container using ContainerView:
Obtain the MoRef of the container
Create the ContainerView ContainerView has a property with the name view and it is an array of type
ManagedObjectReference. This contains the MoRefs of all the types specified
during the ContainerView creation.
vimPort.createContainerView( serviceContent.getViewMgr,
containerMoRef,
new String[]{VirtualMachine},//MO typetrue //recursively look in the container
);
Entity Metrics and Performance Provider Summary
R t i th m t i ID f ll th
7/29/2019 performancemonitoring-100409184324-phpapp01
67/98
67
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Retrieve the metric IDs for all the
entities.
E.g.: For dual CPU VM, metric IDs are 0
and 1 for CPU 0 and CPU 1.
Caveat: Cant get this for powered off
VMs and host systems, disconnectedhosts and orphaned VMs
Tricks:
Performance Metric IDs for entities do
not changeif hardware does not
change.
Therefore:
Cache Metric IDs for entities.
Tip:
Use wild card for metric IDs
Entity Metrics
7/29/2019 performancemonitoring-100409184324-phpapp01
68/98
68
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
vimPort.queryAvailablePerfMetric (
serviceContent.getPerfManager(),
entityMoRef,
null,
null,
intervalID //If not specified, defaults to
//available metrics for historical stats.
);
Entity Metrics and Performance Provider Summary
Performance Provider Summary
7/29/2019 performancemonitoring-100409184324-phpapp01
69/98
69
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware
products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. inthe United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Performance Provider Summary
provides information about:
The type of statistics it supports (real-
time or historical)
The refresh rate for statistics
generation
Performance Provider Summary datais the same for managed objects ofthe same type.
Tricks:
You dont have to retrieve this data for
all entities.
Make sure the interval between twoperformance data queries is equal to at
least the refresh rate to avoid getting
the same value.
Performance Provider Summary
7/29/2019 performancemonitoring-100409184324-phpapp01
70/98
70
Cop