View Only
  • 1.  critical swap usage alert of Host

    Posted Feb 03, 2016 01:32 PM

    I am getting critical swap usage alert in one of the monitoring tool called nagios.

    1) However when I went to the host from vCenter and checked the memory utilization from the cluster, the respective host memory utilization is only 66%

    Also I went to performance tab of a host, when i selected memory, it shows a 1 min high spike and suddenly it went down.

    My question is how do I identify, which VM is using more swap on this Host or what is the cause of  that high spike?

    2) From ESXi command line, esxtop "m" output shows the below

    SWAP  /MB:   123    curr,   122 rclmtgt:                 0.00 r/s,   0.00 w/s

    which means it is using 123 MB swap and reclaim memory is 0.

    My query is, when I can see it is showing 66% utilization of Memory, then why it is using swap? and I am not sure, how do I avoid to such situation in future?

    Can anybody please, I have searched and didn't found anything relevant.

  • 2.  RE: critical swap usage alert of Host
    Best Answer

    Posted Feb 04, 2016 02:06 AM

    Hi there,

    While still in esxtop on the memory screen, press "V" - this will filter the display by virtual machines. From here you want to look at the SWCUR column to see which VM is using swap file.

    Once you have established which VM then you should ensure that you don't have any memory limits set on the VM:

    Kind regards.

  • 3.  RE: critical swap usage alert of Host

    Posted Feb 04, 2016 06:52 AM

    Hi ThompsD,

    Thank you for your response.

    I have checked the command which you have shared, esxtop > pressing "Shift + V" > output of "%SWPWT" column - it shows of CPU mattrix "VM waiting on swapped pages to be read from disk. Possible cause: Memory over commitment". (Which shows the current status, which are "0" value every where).

    I need to search of past data like one or 2 days before, where can I find. I want to know which VM is utilizing over usage of SWAP, due to which Host is giving critical alert about swap usage.

    In ESXTP > pressing "m" > output "SWCUR" it shows Memory mattrix columns - If larger than 0 host has swapped memory pages in the past. Possible cause: Over commitment. (in which only 1 VM has "115" value and rest are showing 0 in the current status.

  • 4.  RE: critical swap usage alert of Host

    Posted Feb 04, 2016 06:47 PM

    Hi there,

    Sorry I'm not 100% sure I understand what you are looking for as the ESXTOP SWCUR column should have identified the VM for you. Since it appears you want to look back in time perhaps the Performance charts might help you here.

    1. From within the vSphere client (web or .NET) select the Performance tab for the host
    2. Ensure Advanced charts are selected
    3. Click Chart Options...
    4. Select Memory>Past Day or Week
    5. Change Chart Type to Stacked Graph (Per VM) and select all VMs
    6. From Counters initially select None to clear counters and then select Swap out rate

    This will build you a custom chart that show the rate at which memory was swapped out to disk per VM for the selected host. Does this help?

  • 5.  RE: critical swap usage alert of Host

    Posted Feb 05, 2016 06:15 AM

    Thanks ThompsG,

    I did exact this steps and found one VM and there was limited memory selected in like your previous screenshot. I have changed it to unlimited.

    After some time, I went to esxi command line and checked the "esxtop" > by pressing "m" > "SWCUR" > Yesterday count for that particular VM was "116" and rest of the VM was "0" and still it is "0".

    Today I have did the same steps and found "SWCUR" for that particular VM is decreased to "58" value. Do I need to reboot that particular VM to go back the "SWCUR" value to zero.

  • 6.  RE: critical swap usage alert of Host

    Posted Feb 05, 2016 06:59 AM

    Hi Raj117,

    I have seen it take some time to empty the swap.

    As you say the quickest way is to shut the VM down and then power on again. A restart may not work as the VMworld will not be recreated in this instance and therefore swap may not be released. You can always try a restart and if this doesn't work the power off then on :)

    Kind regards.