ESXi

 View Only
  • 1.  Linux VM with swapping and not balloning

    Posted Jun 27, 2016 03:29 PM

    Hi,

    We have some linus VMs (RHEL 6) and today we noticed that they worked really slow.

    When I checked the "Resource Allocation" tab on 1 of those VMs I noticed that it was using a lot of Swap (almost 1/3 of all its' memory) and 0 Balloning.

    I know that it could happen if the VMware Tools is not up to date on the VM, so I checked it and it was fine.

    These VMs are running on ESXi 5.5 U2.

    Now, I have 2 questions:

    1. How is it possible that the VM is using only the Swap and not the ballon if the VMware tools is installed and running (also check with esxtop command and the ballon driver is installed)

    2. Is it possible that the information I see under the "Resource Allocation" tab is old? or is it a fresh info from now? (I can also see the swap in the performance tab under memory).

    Thanks!



  • 2.  RE: Linux VM with swapping and not balloning

    Posted Jun 27, 2016 06:40 PM

    Hosts will start reclaiming memory from VMs only when the memory on the hosts is under contention. https://www.vmware.com/files/pdf/mem_mgmt_perf_vsphere5.pdf

    My guess is that if your hosts are not under memory contention, then I would suspect that the swapping you are seeing at the VM OS level is due to the same factors as you would see in a physical server OS (Processes using up more memory than available to the OS)

    My other thought is although rare would be that the host has already attempted to balloon the VMs but this had released zero memory back to the host so swapping was initiated.



  • 3.  RE: Linux VM with swapping and not balloning

    Posted Jun 28, 2016 07:44 AM

    Thank you for the answer!

    But I just want to clarify:

    1. The host is not under memory contention (around 65%).

    2. The Swap I see is not at the OS level but at VMware level (under "Resource Allocation" tab).

    3. The weird thing here is that the VM is swapping but not balloning at all... Is it really possible that the ballon driver released 0 memory?



  • 4.  RE: Linux VM with swapping and not balloning

    Posted Jun 28, 2016 07:11 PM

    Do you have any resource pools or memory limits set for these VMs? This could explain this strange behavior.

    If there is no contention then there is no reason for the host to attempt memory reclamation. Could you try to vMotion the VM to another host and check for swap. Also send over the results of esxitop for this VM so we can see the swap in action?

    SSH to host running the VM

    esxtop

    V (Capital V)

    copy/paste the info from the VM including the headings: MEM – SWR/s (J)  and  MEM – SWW/s (J)



  • 5.  RE: Linux VM with swapping and not balloning

    Posted Jun 29, 2016 02:00 PM

    We don't have any resource pools or limits on those VMs.

    I tried to VMotion the VM but it didn't help.

    Also, attaching all screenshots (the VM we are talking about is LUNA2).

    For some reason, esxtop doesn't show the swap but as you can see, I see it in the vCenter..



  • 6.  RE: Linux VM with swapping and not balloning

    Posted Jun 29, 2016 11:00 PM

    Interesting, I would trust ESXTOP more than any GUI.

    Time to restart the VC/host perhaps or to avoid disruption try restarting the hosts management services first?