VMware Cloud Community
XavierE
Enthusiast
Enthusiast

ballooned performance counter

I am running vSphere. I have an ESX with plenty RAM (16GB) for some light VMs.

I have this RHEL 5.3 Linux VM that I setup awhile ago with 4GB of RAM configured size and noticed that the Memory>Active is almost always very low (average 550MB). So I decided to play with the limit value and set it to 2GB. Almost right away I noticed that the balloon counter started going up and down, but I don't see the swap counters (swapped, swap in, swap out) showing anything.

Does that mean the the balloon counter is simply reclaiming some of the other 2GB of memory I limited the VM for using it for other purposes? or does this balloon counter is pointing to an issue?

See image attached.

0 Kudos
5 Replies
AWo
Immortal
Immortal

The balloon driver should only become active if there's memory contention between guests. That means if physical RAM can't be aquired for memory granted to a guest when it is requesting it. It forces another guest to swap out to disk thereby freeing up memory which is taken away and given to guest which needs the memory.

So by limiting the memory granted to a guest (the RAM setting) ballooning shouldn't occur (as it makes more memory available for other guests).


AWo

VCP / VMware vEXPERT 2009

\[:o]===\[o:]

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
weinstein5
Immortal
Immortal

By setting the limit your are capping the amount of memory being delivered to the VM - so by setting the limit to 2 GB you have told the vmkernel that it can give the VM only 2 GB but the O/S still thinks it has 4 GB so when the O/S goes above the 2 GB it will cause ballooning to occur - If you review the real time statistics I am sure you will see the VM will use more than 2 GB because remembber with Linux it will use all available memory when it needs it -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
AWo
Immortal
Immortal

Yes, when the limit of 2 GB is applied to a RAM setting of 4 GB. I thought he decreased the overall amount of RAM.


AWo

VCP / VMware vEXPERT 2009

\[:o]===\[o:]

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
XavierE
Enthusiast
Enthusiast

Thank you guys for your inputs,

I understand that by setting the limit to 2 GB the vmkernel can give the VM only 2 GB but the O/S still thinks it has 4 GB so when the O/S goes above the 2 GB it will cause ballooning to occur

In this case I still don't understand why the balloon counter -in the image I attached- is going up and down if in the real time statistics -see the image attached- is not showing that the VM is using more than 2GB -at least that's what it looks like by the very low memory active-, nor there's swap in or out activity in the counters

0 Kudos
drummonds
Hot Shot
Hot Shot

The balloon driver is implemented as a device driver in the guest OS. As it inflates it takes memory from the guest and pins that memory so the guest cannot reclaim or use it. The memory is still visible to the guest, but unavailable.

By setting a memory limit to the VM you have asked the kernel to reduce the VM's memory footprint through ballooning or swapping. Because ballooning is so much more efficient that swapping, the balloon driver inflates first.

To understand the fluctuations, you would need to check swap activity on the same VM and ballooning and swap activity on other VMs. All of these activities are interrelated.

Scott

More information on my blog and on Twitter:

More information on my blog and on Twitter: http://vpivot.com http://twitter.com/drummonds
0 Kudos