Pages

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 .
http://kb.vmware.com/selfseOrvice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2008122
* 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 
# CPU
# 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 
m=>Memory
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.

Tuesday, April 16, 2013

Configure ESXi

NTP Configuration on ESXi Host


vSphere Client :




Web client





DNS and Routing Config


Using ESXi DCUI console :






 VC client





Hyper Threading 

Hyper threading is the advanced CPU feature available on Intel NEHALEAM  CPU series , which allows cpu to run two threads simultaneously.Its helps to improve the CPU performance by 0 - 40 % on supported systems.


Os can recognize  whether physical cores or Hyperthreded cores but application will not be able to distinguish .


ESX  Behavior:


Esxi scheduler can distinguish between the Physical cores and the hyperthreded cores. scheduler will allocate the physical cores untill physical cores are loaded .If there are additional vCPUs requesting CPU resources they will then be assigned to the additional logical cores. By this method HT has no impact on performance until more vCPUs are concurrently executing than there exist physical cores.




To enable Hyper-threading , this need to be first enabled in the BIOS of the host . 

Configuration using vSphere client:

Hyperthreading - web client





Hyperthread config for VM 



VM level sharing  :

  1. Any - Default - allows VMs to share virtual core from other VMs as well. This is set by default.
  2. None -Virtual Machine get exclusive access to the core the other thread who wants to access the core has to wait.
  3. Internal  -VMs are allowed to share cores from the same physical cores


Memory compression cache
 ESX Uses Memory compression techniques i.e GZIP to extend the use of RAM which will reduce the swapping of memory pages . Memory compression is enabled by default and improves the performance when over-committing the memory by limiting the swap to disk .This technique divide VM swapping memory to 4KB and tried to compress them to 2KB. If compress success, then, you can save 50% space, if it fails, VM still swap the original 4KB to physical disk.



Enabling/Disabling Memory Compression

Open the Virtual Center and select Hosts and Clusters
Select a host and click the Configuration tab
Select Software | Advanced Settings
Select Mem.MemZipEnable, 1 for on, 0 for off


Configuring Memory Compression
Open the Virtual Center and select Hosts and Clusters
Select a host and click the Configuration tab
Select Software | Advanced Settings
Select Mem.MemZipMaxPct. 
This defaults at 10% of the RAM for caching and can be altered from 5% to 100%


Note : Compression process uses 2 - 3 % of Host CPU and time of compression is 20 ms. Compressed Memory is placed in the VM Memory not the Host Memory .




ESXi Licensing

You can add any number of licenses to  vSphere environment using the vsphere license key. Esxi license is socket based . There is not more restriction on the Memory ( vRAM entitlement )

Home => Administration => Licensing => Manage Vsphere License => Add license key 











Vcenter installation


Steps

  1. DNS Sever needs to be reached from New vCente Sever . DNS is one of the Main c0mponenet of Vcenter
  2. Install windows 2008 R2 operating system (From vSphere 4.1 , vcenter is supported only on 64 Bit OS)
  3. Enable Application server role to install  .Net Frame work 3.5.1 which is pre-requisite for SQL 2008 Standard Edition 

  1. Install SQL 2008 server  on vCenter server
Note : Don’t install the Reporting service in vCenter server as it uses 80 and 43 ports



  1. Disable the Dynamic Port






  1. Mount the vCenter ISO

  2. Browse to  I:\Single Sign On\DBScripts\SSOServer\schema\mssql Copy the files to Management studio of SQL 2008
     
CREATE LOGIN RSA_DBA WITH PASSWORD = '<CHANGE DBA PASSWORD>', DEFAULT_DATABASE = RSA

CREATE LOGIN RSA_USER WITH PASSWORD = '<CHANGE USER PASSWORD>', DEFAULT_DATABASE = RSA

Change the password and make a note of it. This password is required for further installations. First Script is used to create the data bases called RSA which is used for Single Sign On.

  1. Create a new database for Vcenter and Upgrade manager – VCDB and VCUPDATEDB
Set recovery model as Simple for ease of Management.

  1. Create a System DSN
 
 
  1. Now the pre-requisites for Vcenter 5.1 one is ready . We are good install vcenter 5.1
  2. Vcenter Single Sign on Installation
    Change the permissions of the RSA_DBA  and RSA_User on RSA database
    Database User : RSA_DBA
    Database User : RSA_User
    Database Instance: vcdb

  3.  
 




Access rights on the Single Sing on Data Bases








Inventory Services


User Id created while installing Single Sing On




Vcenter Server Installtion





 
 
 
 
 This would complete the installation in vCenter 5.1
 
 
 
 
 
 
 
 
 
 
 
 
 

Install and Configure vCenter Server

vCenter Server Editions
VMware vCenter Server provides unified management for VMware vSphere environments and is a required component of a complete VMware vSphere deployment. One instance of vCenter Server is required to centrally manage virtual machines and their hosts and to enable all VMware vSphere features.




VMware vCenter Server is available in the following packages:
 

 

  • VMware vCenter Server for Essentials kits – Integrated management for VMware vSphere Essentials kits
  • VMware vCenter Server Foundation – Centralized management for up to three VMware vSphere hosts
  • VMware vCenter Server Standard – Highly scalable management with rapid provisioning, monitoring, orchestration and control of all virtual machines in a VMware vSphere environment
All editions of vCenter Server include the following components:




 

 
  • Management server –Acts as universal hub for provisioning, monitoring and configuring virtualized environments
  • Database server – Stores persistent configuration data and performance information
  • Search engine – Allows administrators to search the entire object inventory of multiple VMware vCenter Servers from one place
  • VMware vSphere Client – Provides administrators with a feature-rich console for accessing one or more VMware vCenter Servers simultaneously
  • VMware vCenter APIs and .NET Extension – Allows integration between vCenter Server and other tools, with support for customized plug-ins to the VMware vSphere Client
VMware vCenter Server Standard also includes the following additional features:




 

 
  • vCenter Orchestrator – Streamlines and automates key IT processes
  • vCenter Server Linked Mode – Enables a common inventory view across multiple instances of vCenter Server

vSphere Editions :
  • Standard
  • Standard Plus
  • Enterprise
  • Enterprise Plus


http://virtualization-tips.blogspot.co.uk/2013/01/vsphere-licensing.html



 Deploy the vCenter Appliance

 Alternative to deplyoing the vcenter server on windows server , adminitrators can download and deploy the preconfigured Linux machine .


Default user Name : root  and Password : vmware

MS SQL and IBM DB2 are not supported by vcenter Appliance .Vcenter Appliance user PostgreSQL as database instead of IBM DB2 which was used in vcenter 5.0 version.

Unsupported features:
  • MS SQL
  • IBM DB2
  • IPV6
  • Vcenter linked mode
  • No Update manager
Note: Embeded Database supports only 5  hosts and 50 VMs

Pre-requisites
  1. Esx Hosts with 4.x or grater version
  2. vsphere clinet
  3. Min  7 GB disk space which can grow up to 80 gig . DIsk is thin provisioned

Deploy :
  1. Launch vSphere Client and navigate to File | Deploy OVF Template.
  2. Browse to the location of the vCenter Appliance .ovf file, then click on Open =>Next =>next
  3. Under Name and Location, give your vCenter Appliance a name then click Next.
  4. Choose a datastore then click Next.
  5. Select a disk format on the next page then click on Next to continue.
  6. Click on Finish to start deploying.
To configure the network ,  Just login to the console and type the following:




 /opt/vmware/share/vami/vami_config_net
Make sure to fill out the following sections:
  
  1. Default Gateway
  2. Hostname
  3. DNS
  4. IP Address Allocation for eth0

Validate the settings by browsing to following link

 https://<IP address or DNS name of your vCenter instance>:5480.













 
VCenter Data Base Sizing :



VC Client DB retention policy settings