VMware Cloud Community
danw76
Contributor
Contributor

Host memory always totally consumed, why?

I have 10 VM's and have allocated each 2048 MB through 'Edit Settings...'.  I had assumed that this means, that the maximum amount of memory that the VM will draw is 2048 MB, but if the VM requires less, then it will only take what it needs? 


Whilst running tests on these VM's and leaving them to idle without programs running, my setup doesn't seem to be doing this.  When I first boot a VM (they're all Win 7), the Consumed, Host Memory will start from 0 but slowly increase until it hits the 2048 MB mark.  The Active, Guest Memory will start off around the 1.70 GB mark (I assume this 'Guest Memory' is the true amount of memory that the computer is requiring at this time), but gradually after 15 mins or so of running, it work's its way down to the 400MB mark.  At that rate, if the general RAM required to run ESXi is 1.2GB and this machine is only requiring 400MB, then the total RAM use on the Host should be 1.6GB, however, the host is saying that 3.2GB is being used (1.2GB + 2GB Consumed = 3.2GB.


I have 16GB of RAM on the host, but if I wanted to run 10 VM's, the system would require 21.2GB (1.2GB for ESXi + (10 VM's x 2GB)) = 21.2GB.  It should only require 5.2GB once all machines have settled shouldn't it (1.2GB for ESXi + (10 VM's x 400MB)) = 5.2GB ?

0 Kudos
4 Replies
a_p_
Leadership
Leadership

The amount of memory assigned/granted to a VM depends on the VM's demand. If a VM requires a certain amount of memory, VMware grants the required memory to the VM. Since VMware doesn't know what the VM is using this memory for and which pages are actually used, it cannot revoke the granted memory. In case of contention however, techniques like ballooning (provided VMware Tools are installed in the guests) come into play, where the ballooning driver in the guest inflates (depending on the current guest OS memory usage) and provides the "borrowed" memory to the vmware process running on the host in order to use it for other guests.

André

0 Kudos
danw76
Contributor
Contributor

I have just updated vmware tools for each machine.  With this in mind, if I powered on all 10 wm's (all allocated 2 GB RAM each), the host wouldn't need to have 20 GB available as ballooning would come into play (when the full 16GB capacity is taken) whereby some of the 2GB allocation, given to each VM, would be reduced for each VM to allow the 16GB to be shared amongst them all?

0 Kudos
a_p_
Leadership
Leadership

Please take a look at http://www.vmware.com/pdf/ws7_performance.pdf for details about the Memory Overcommit Techniques used. This may have changed slightly with WS9, but most of it still applies.

André

0 Kudos
danw76
Contributor
Contributor

Thanks Andre

0 Kudos