Friday, 19 February 2016

The greatest confusion between VMware vSphere performance report of a VM’s CPU/RAM usage and the actual usage trend of CPU/RAM inside the VM’s Guest OS.

Or, Why CPU and RAM usage percentage of Guest OS is different than it appears in VMware vSphere performance monitoring tab?
Answer: Please read this full article to understand.

Or, Can VMware vSphere give you actual CPU/Memory usage trend of Guest OS according to inside utilization status?
Answer: No

Or, Is VMware vSphere capable of Monitoring RAM/CPU usage of Guest OS (e.g. MS Windows)?

Answer: No

Friends, it has been quite long since I have been looking for some crystal clear and authentic information about these confusions, and finally I got all my answers with from VMware Technical Support... So, I thought to share this information with you all so that at least you can get some idea behind the scene... However, I would recommend you to please get in touch with VMware Technical Support if you still need some clarifications.

The conclusion of this post is to clarify that the VMware vSphere does not have any intelligence to monitor resources usage inside the Virtual Machine (guest OS).

My Observation: When I checked my Virtual Machine(Windows Server 2012) from inside the windows, it was utilizing 95% of memory but when I checked the Virtual Machine performance graph from vSphere client, it was showing memory usage only  10% to 20%. Isn’t it shocking?

Concepts behind the performance monitoring in VMware vSphere:
VMware performance statistics (esxtop and performance chart) show Memory and CPU details from vCenter and ESXi perspective. These stats are for monitoring the usage of resources for VMs on the ESXi hosts, Parameters such as Memory usage, Consumed and active all show the amount of memory used, consumer and currently in use as seen by ESXi host kernel ( vm kernel ) for each VM .

VMware does not intrude into the guest OS performance stack and do not have any parameters which shows the amount of CPU, Memory and Disk usage seen within the guest OS. This because each OS has its own method and architecture for managing its resources.

For instance, There are times when the Guest OS (windows perfmon, etc) will show lower CPU usage than VMware reports.  The guest doesn’t know anything about the CPU used to virtualize the hardware resources it is requesting. ESXi does, and accurately attributes that load. 

There are also times when the Guest OS will report a higher usage of CPUs than the hypervisor will. Windows doesn’t know that part of the time, the CPUs are being stolen away from it and given to other guest machines. As far as it knows, it is using all the CPU it can on 3 of the 4 CPUs- so that must equal 75% load. It doesn’t know that part of the time, it has no access to the CPU’s as they are being used elsewhere, so the real time CPU usage is only about 50%.

Key take away from this is that we need use both VMware performance stats as well as guest OS specific monitoring tools like perfmon, task manager etc . . you cannot use the ESXi host’s view of the CPU/Memory load to tell if a system wants more than the resources allocated to it – only how much of the resources allocated to it are being used from ESXi stand point.

There are different parameters to understand the memory and CPU usage of a Virtual Machine in vSphere client, like Memory Usage, Active Memory, and Consumed Memory. To know more about these parameters, please read my article.

No comments:

Post a Comment