VMware Cloud Community
ScotofMKE
Contributor
Contributor

Ballooning happening on host with one guest

Our host (ESXi 4.1) has a dedicated guest with all the memory allocated to it.  The guest is running SQL, and we often experience performance problems.  Veeam One reports ballooning above 10%, and that is odd.  If ballooning happens by borrowing memory from another VM, how is it possible in this scenario of only one VM? 

The next question is what is the best way to fix this ballooning issue?  I'll note that I found the guest has 32 GB assigned to it which is the amount on the host.  I plan to reduce the allocated memory for the guest to 31 GB in order to make memory available for the host OS. 

Tags (1)
3 Replies
martinriley
Hot Shot
Hot Shot

Hi there,

Ballooning is where the host reclaims memory from a Guest VM when it is under memory pressure, usually when it doesn't have enough memory resources to satisfy the demand from it's running VMs, and it does this by 'inflating' the vmmemctl driver in the guest to steal memory back for your host.

In your case this is why it's causing you performance issues as SQL is fighting for allocated memory in your Guest OS with vmmemctl, which is trying to reclaim memory to help provide enough memory to run your VM, in which SQL is doing what SQL does and grabbing all the available memory allocated to it regardless of requirement, so at the moment it's counter-productive.

In your case because you've allocated all your host's RAM to your VM there is nothing left available for the hypervisor or the overhead of running your VM- assuming a minimum of 2 vCPUs in your VM, given the amount of RAM allocated and the fact you're on 4.1 your VM will require nearly 1Gb of RAM overhead to run, which I suspect is largely why the host is fighting to reclaim memory.  Factor in the memory requirements of the hypervisor (usually around ~300Mb-ish) and the issue is clear.

To resolve I'd drop the RAM allocated to your VM to 30Gb at the absolute most, you should see the ballooning stop and you should also see improvement in the performance of your VM. Personally I'd drop the vRAM to 24Gb or less and see how the performance is, then add a bit more if deemed necessary, remembering SQL will take all the memory it can get regardless of whether it actually needs it.

Hope that helps

vM

-----------------------

VCAP-DCD / VCAP-DCA / VCP-CLOUD / VCP-DT / VCP5 / VCP4

-----------------------

vMustard.com

0 Kudos
ScotofMKE
Contributor
Contributor

Thanks.  That does help.  To clarify, ballooning in most cases results from a VM needing memory, and it pulls it from another VM (through the host), is that correct?  In other words, I've understood it as a fix for a problem of low VM memory, and not usually low host memory. 

0 Kudos
a_p_
Leadership
Leadership

As martinriley mentioned, it's the host which does the memory reclaiming in case it's under memory pressure. Although you are basically right that this is mostly caused by overcommitting memory (i.e. provision more memory to the VMs than physically available) the host will also reclaim memory for its own use if necessary.

André