Total Pageviews

Tuesday, April 23, 2013

Performance Monitoring

Commonly used performance monitoring tool :

=> vSphere performance chart - access via both vsphere client as well as  web client.
=> esxtop or resxtop : individual ESX monitoring tool .
=> guest Monitoring tools : Perfmon , IOmeter

For virtual platform always two layers of monitoring is required , i.e. host level and guest level and it should be monitored over a period of time. 

Note :
* resxtop in batch mode cannot be used in vMa because of bug as of now .
* Avoid using guest monitoring tools which depend on time synchronization .
* when vsphere client is directly connected to esx host only the real time  performance data is available and this data is stored in flat files of ESXi Host  

Vmware performance Data is available in 2 type i.e overview and advanced .

Over view : 
Depending on the object you selected, performance in the overview plan is displayed.

Advanced : 
Displays the statistical data of esxi host or any object in the vcenter like datastore, cluster, resource pool , VM , vapps. Available chart options are 
# Memory 
# Disk 
# Management Agent
# Network and 
# System

Chart Types : 
# Line Graph
# Stacked Graph 
# Stacked Graph per VM  (Only on  ESX)
# Bar chart (Storage Metrics)
# Pie Chart (Storage Metrics)

Counter : 
Depending on the chart option you can select the Object , For ex , if you select CPU as char type you can see the objects as CPU usage , CPU ready time etc. Under counter you can see description of counter , Roll up , unit and internal name . 

Statistics at different Granularity:

These are predefined values and cant be changed . 

Statistic Type :

# Rate : value over current interval.  ex - Cpu usage 
# Delta : changed from previous interval. ex - cpu ready time 
# absolute : independent of interval .  ex- Memory Active 

Roll up : conversion function between the statistics 
# average  : avg of data points : CPU usage 
# sum : sum of data points : CPU ready time 
# latest : latest data point  : Uptime

Note : 
* For real time data , its current max and current min 
* For historical data its avg max and avg min

You can save the performance report in JPEG, BMP, PN BacG,GIF and in excel format.

resxtop :

It can  be run in following mode 
# Interactive (Default): real time 
# Batch  : output is redirected to a file 
# Replay : used for tech support using vm-support command and is replayed using the esxtop

Usage : Login to the system which has vcli and should have administrative role on Esxi host

Interactive Mode : 

# run resxtop --server esxhost --username root . This will prompt for the password.
# if you have connected to vcenter use following 
resxtop --server vc --username userid --password vcpwd -vihost esxhot

# type the following to change the behavior 
c =>CPU 
d =>disk adapter
u => disk device
f => add or remove column 
v =>virtual machine view
n => network view
h => help
q => quit 

if you type d , resxtop would display Adapter , Path , Npth,CMDs,Reads,writes,Mbreads, MBWRTN/s,DVAG/cmd,KAVG/cmd,GAGV/cmd,QAVG/cmd.

when you press f column names will be displayed . The name which begins with * indicate the column is added to the output.

Note : 
* Options are case sensitive .
* Space bar is used to return to the screen .
* W is used to save the configuration.

Batch Mode 
resxtop -a -b >>file.csv

a - all parameters
b - batch mode 

Note : 
*Always start the VM before enabling the batch mode because newly added VM counter will not stored once the batch mode is enabled.

Replay mode :
vm-support -s -d 300 - I 30 

resxtop -r filename  (replay)

-s : restrict the collection of diagnostics data 
-d : duration logging for 300 sec ie 5 min   
-I : sampling interval  i.e each sample will be collected after 30 sec 

You can use perfmon to view the resxtop output file.

Guest Monitoring 
From 5.1 version Vmware has started adding additional Dlls which are installed on guest os using the vm toll. But this parameters are disabled by default . you need to enable these dlls to use them in the perfmon under the guest os . Extra counter that are added are  VM Processor and VM Memory.

tools.guestlib.enableHostInfo => true in .vmx file.

1 comment: