VMware vSphere

 View Only
  • 1.  Disable Memory Ballooning and Sharing

    Posted Apr 03, 2015 01:19 PM

    We have a cluster with 5 ESXi 5.1 hosts.  We want to make sure there is no memory swapping or ballooning occurring.  We've always made sure that our ESX hosts have plenty of RAM to accommodate all that we assign to our VM's, so I think we would be taking a performance hit if we were sharing/swapping or ballooning memory.

    I noticed in our test cluster that even though we have more memory on our hosts than the VM's require, it seems like there is some sharing going on.  I was not able to find this in our production environment though.  I just want to make sure that we're subscribing all of the memory we assign to our hosts and they are not swapping around when not in use.

    In the past, i thought this option was in VM Properties under the Resources tab.  I think for CPU it's fine, reservation is set to 0 but with unlimited checkbox checked.  For Memory I see 0MB for reservation as well, Shares set to normal, Unlimited checked.  I also see a checkbox for "Reserve all guest memory (all locked)".  Would I want to check this box to be sure there is no sharing?  I think ballooning might be a different setting.



  • 2.  RE: Disable Memory Ballooning and Sharing
    Best Answer

    Posted Apr 03, 2015 07:14 PM

    Hi,

    You can reserve whole of VM's memory and ESXi doesn't share this VM's memory with another VMs.

    But if you want to disable ballooning, you have to do it within each VM guest OS because VMware tools includes balloon driver.

    http://www.vmware.com/resources/techresources/10206

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2017642

    Check he above links for more information.



  • 3.  RE: Disable Memory Ballooning and Sharing

    Posted Apr 03, 2015 07:36 PM

    OK, so it sounds like using the default setting of 0MB means it can essentially share at any time?  So I would have to push that reservation to what the actual RAM I've assigned to the VM if I don't want this to happen?  I assume since we're over built on RAM compared to actual usage, this isn't happening much.

    As far as ballooning, I did not realize that, although I don't ever see any ballooning, I think again due to the fact we're over built on our hosts for RAM.

    So it sounds like there is NO way to disable either of these from happening globally, I would actually have to visit each VM's settings and VMware Tools config?



  • 4.  RE: Disable Memory Ballooning and Sharing

    Posted Apr 03, 2015 07:57 PM

    When virtual machine has no memory reservation, ESXi creates a swap file equal to the VM's memory size, so reserving all memory will reduce your disk cost as well.

    But until, the host is not using swapping, there is no impact on VM performance and host performance.

    Do you have enough resources for failover?

    By memory reservation, HA will power on VM after failure, if reserved memory is available on failover host or cluster.

    If you want to reserve memory for all VMs, you can use PowerCLI and also read this KB for disabling VM ballooning driver: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002586



  • 5.  RE: Disable Memory Ballooning and Sharing

    Posted Apr 03, 2015 08:25 PM

    OK, makes more sense now.  I know about the swap file, but didn't realize that this wouldn't be needed if we physically reserved all of the memory.

    Right now we could lose 2 of our 5 hosts and still run everything.



  • 6.  RE: Disable Memory Ballooning and Sharing

    Posted 4 days ago

    those urls dont work




  • 7.  RE: Disable Memory Ballooning and Sharing

    Broadcom Employee
    Posted 3 days ago

    To disable Page Share you can refer : https://knowledge.broadcom.com/external/article?articleNumber=318959

    To disable Balloon Driver   you can set VM config option - sched.mem.maxmemctl = 0

    P.S: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/7-0/vsphere-resource-management-7-0/administering-memory-resources/memory-reclamation/memory-balloon-driver.html




  • 8.  RE: Disable Memory Ballooning and Sharing

    Broadcom Employee
    Posted 2 days ago

    I would not recommend setting a reservation, yes it guarantees no ballooning / swapping, but if you have plenty of memory (compared to VM memory) then it is no concern anyway.

    When it comes to memory sharing, it is highly unlikely you will notice any performance difference to be honest.

    vSphere is not swapping or ballooning UNLESS there's real memory pressure, at which point you will probably want to see ballooning followed by swapping as other wise your VMs would stop.