VMware Cloud Community
Exile_Ken
Contributor
Contributor

VMs with memory ballooning with plenty of free RAM on Host

I am a bit confused about memory ballooning, and when it is supposed to occur. We are seeing VMs have their memory balloon drivers inflate when there is no apparent reason that this should happen. I manage what is at this point fairly small VMWare environment of four ESX 3.02 hosts running a total of 21 VMs. Most of the Guest OS's are Windows 2000 or 2003 server. There are plenty of resources available on all the boxes, which each have four quad core procs and 32 GBs of RAM. Each host is using between 8 and 12 GBs of RAM according to VC, leaving plenty of unused RAM.

I noticed last week that four VMs show that memory ballooning is taking place within the guest OS. There is no particular rhyme or reason that I can see why these machines would have the memory balloon driver inflate. The VMS have different amounts of memory assigned, (from 512 MB to 1024MB), they are spread across different host servers, and are not clustered together using windows clustering, or have any unusual configurations on the guest. They all run different applications or services. In fact, there are two VMs which are Windows 2000 terminal servers with near identical configurations (they were cloned from the same template) and one shows a memory balloon taking up about 20 % of the guest memory assigned, and the other shows no ballooning at all. Because we have plenty of CPU power and RAM available, we had not defined resource allocation on any of the hosts, resource pools, or VMs. In trying to figure out how and why this was happening, I did create a memory reservation for one of the VMs that was ballooning about 256 MBs ( the VM has 512 defined). This caused the balloon to deflate almost immediately, and since I made this change yesterday, there has been no ballooning on this VM.

In conclusion, (and I apologize for writing more than I had planned), this is not an issue for us at the moment. All VMs are performing fine. However, I would like to understand why the ballooning driver is inflating in certain VMs when there is plenty of RAM available on all hosts and no VM should be constrained. Our VM environment will grow over time, and I am sure I will not have the luxury of excess resources for very long, and would like to understand better how all this is supposed to work so that when I have 40 or 50 VMs in the same environment, I can understand how to allocate memory in the most efficient way possible.

Thank you in advance for and tips, pointers, or references to any posts or articles that can help explain this.

KM

Reply
0 Kudos
9 Replies
mittim12
Immortal
Immortal

Do you have any hard memory limits defined on these vms? I have read stories where people experienced ballooning when having hard limits set on the VM that were less then the amount of memory assigned to the VM.

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points

Reply
0 Kudos
weinstein5
Immortal
Immortal

are using resource pools?

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

Good reading to the ram topic, but unfortunately no explanation to your question:

http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&externalId=143-143828xml6&sliceI...

BTW, we also see in our not overcommited environment a slightly amount of ballooning. (4 *32 GB RAM Dl380G5 with around 75 vm's - most windows 2003)

Regards

Spex

larstr
Champion
Champion

KM,

Do you have less than 6.4 GB physical ram available?

Lars

Reply
0 Kudos
jitendrakmr
Hot Shot
Hot Shot

It also depends on the application running inside VM. VMware uses a page sharing technique to allow guest memory pages with identical contents to be stored as a single copy-on-write page. Page sharing decreases host memory usage, but consumes system resources, potentially including I/O bandwidth. It also does memory trimming in which VMware checks which part of the guest OS virtual memory is not used and allocates it back to the host OS. This permits to have more concurrent virtual machines running but everytime the guest OS asks back for its memory it suffers a performance degradation.

Refer http://communities.vmware.com/thread/146270 for more details.

Jitendra Kumar

MCSE 2003, VCP, CCNA, ITIL Foundation

VCP, MCSE 2003, MCITP Enterprise Admin, CCNA, ITIL Foundation, Netapp NS0-153 (Storage Networking) Personal Website - http://www.virtualizationtrainings.com, http://www.hillsindia.com
Reply
0 Kudos
Exile_Ken
Contributor
Contributor

There are no limits defined so far as I can see. I presume you are referring to Resource Allocation in the Resources tab in the VM settings. There is nothing defined in this page on any of the VMs (and the unlimited box is also checked), with the exception of the one VM that I alluded to in my post where I defined a 256MB reservation.

Thank you for your response. I was away from home with no PC access this weekend, so I am responding now.

KM

Reply
0 Kudos
Exile_Ken
Contributor
Contributor

We have a single resource pool defined, but only one of the VMs in question is a part of it. The other three were not. However, this resource pool is also set with nothing defined limiting CPU or memory resources. It was created by a consultant who assisted us with the VMware implementation as an example, and also for future use as our VMware environment grew and available resources became more constrained.

Reply
0 Kudos
Exile_Ken
Contributor
Contributor

Do you have less than 6.4 GB physical ram available?

Lars

All 4 ESX Hosts have 20 GBs or more of available RAM.

KM

Reply
0 Kudos
Exile_Ken
Contributor
Contributor

Jitendra,

Thank you for your post and explanation. As I mentioned in my original post, the four VMs that show memory ballooning really have very in common. Here is a list of the VMs, , the OS, SP level, and application role, the amount of RAM allocated to that VM:

VM1: W2K, SP4 W2K Terminal Server in application mode 2048 MBs RAM

VM2: W2K3, SP2 ISA 2006 Server for publishing Active Sync 768 MBs RAM

VM3: W2K3, SP2 File Server, no running Apps 1024 MBs RAM (in resource pool)

VM4: W2K3, SP2 WSUS (Windows updates) Server 768 MBs RAM (now with 256MBs reserved, no ballooning)

Once again, this is not something that is causing any noticeable performance issues at this time. I am simply curious why these 4 VMs would have memory ballooning activated, the other 17 VMs do not, and there is an abundance of memory resources available on all hosts.

KM

Reply
0 Kudos