• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1408
  • Last Modified:

Monitor VMs memory swapping in VMware ESXi

We are trying to determine which VMs are consuming the most resources in our ESXi environment. We know memory swapping is bad and we are trying to find out which VMs are swapping.

Is there command \ script that allow you to monitor memory swapping in Windows Boxes?

In linux there is vmstat, but Windows all I aware is Task manager...

0
Mazdajai
Asked:
Mazdajai
  • 5
  • 4
  • 2
  • +1
2 Solutions
 
jakethecatukCommented:
Performance Monitor will help you from a Windows point of view.

Also suggest you have a look at vSphere Client under performance and see how the VM's are performing there with regards to memory balooning and swapping.
0
 
jakethecatukCommented:
Oh...and resource monitor as well - available on the performance tab of task manager (assuming you are running 2008)
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Also Check the Important VM Figure of Active Memory

Check this article

Identify memory bottlenecks and remove: Memory Performance Analysis and Monitoring
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
MazdajaiAuthor Commented:
We have about 400 VMs that need to be monitor, not sure if performance monitors can be done in relatively quick manner? Ideally, we want a brief summary for the virtual memory status at a certain time.

Alternatively, is it possible to setup alerts to monitor guest memory under vsphere?
0
 
dbarber012577Commented:
Read the article posted by Hancocka, its a good one.

Also, if you post your versions of vCenter, we can probably be more help.

Having recently gone through something similar, my recomendation is to treat the VMs as physical hosts and use whatever tools necesary (PerfMon etc...) on the guest OS. What you then need to look at is active memory, swap, and balloon on the ESX hosts. This can be monitored via vCenter. "Host swap pages write" is a configurable alarm in vCenter 4.1. You can also use vCenter to export the performance data for VMs by selecting a host, choosing  "report" under the file menu, and selecting stacked graph per VM. The "Advanced" button will allow you to select the sub options such as swap etc..Keep in mind these are going to be rollups (meaning averages) over time, but you should be able to identify any heavy hitters. This can be a tremendous amount of data, just be prepared...If you see heavy swapping or ballooning at the host level, this implies a memory constraint. As for scripts, you can use powercli to query swapping and other "quickstats" at the resource pool level. For example $rp.Summary.QuickStats.SwappedMemory, $rp.Summary.QuickStats.BalloonedMemory. I don't have a script handy, but a quick google search should get you what you need.

 Hope this helps.
0
 
MazdajaiAuthor Commented:
Thanks. vcenter version is 4.1 345043

I am looking into SwappedMemory and BalloonedMemory see if we can identify the culprit.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
What is the Active Memory, and does it EQUAL Memory Allocated?
0
 
MazdajaiAuthor Commented:
Are you talking about the hosts or the guests?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Guests Active Memory, looking at the performance memory graphs
0
 
MazdajaiAuthor Commented:
Looks like this is a tough one, I still have not find powercli scripts that able to get the SwappedMemory and BalloonedMemory at a scheduled time.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
There is a node in the VMware Community Pack which reports Resource Pool:  Swap / Ballooning check.

VMware Community PowerPack
http://www.virtu-al.net/featured-scripts/vmware-powerpack/
0
 
MazdajaiAuthor Commented:
Solutions provided a lead to help monitor the swap.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 5
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now