VMware Cloud Community
A25Simon
Contributor
Contributor

Host memory usage and Guest memory usage

Hi All,

I have this VM that shows minimal guest memory usage but very high Host memory usage.... how dooes this happen ?

Scenario:

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

VM guest memory usage is 470 MB.

VM host memory usage is in GB.. 24 GB to be exact... and is resulting in shooting off memory low alerts on my ESX Server.

This VM has been alloted 24GB of the 35 Gb of ESX memory at the time of creation.

0 Kudos
6 Replies
a_p_
Leadership
Leadership

Some operating systems (like Windows) initialize the RAM on boot. This way the host memory usage equals the assigned memory. If the host runs into memory contention, it will start to reclaim some of this memory using e.g. ballooning.

André

0 Kudos
A25Simon
Contributor
Contributor

Hey Andre,

The issue here is that Host memory usage by VM is very high when compared to the Operating System memory usage which is in MB... not sure why...

0 Kudos
a_p_
Leadership
Leadership

That's what I said. The guest OS initializes its assigned memory at boot time and thus claims the host memory. Since ESXi is not aware how the memory is used by the guest it cannot reclaim it, although the guest may not actively use all of it. However, in case of contention the memory reclaiming techniques will be used to make unused memory available for other VMs.

André

0 Kudos
A25Simon
Contributor
Contributor

Hey Andre,

If you could please let me know what you mean in the figures mentioned.... i stil dont understand why a VM which has been powered on for the last 30 days or more has this extraordinary Host memory usage....

0 Kudos
a_p_
Leadership
Leadership

When the guest first "touches" a memory page, it is allocated by the Hypervisor and assigned to the VM. Since this is done for the whole assigned memory (24 GB as you mentioned in your first post) by some operating systems, the host memory usage may be much higher than the guest memory usage.

Please take a look at http://www.vmware.com/files/pdf/mem_mgmt_perf_vsphere5.pdf which describes this in detail. Although the whole document is very interesting to understand memory memory management you may read "Memory Management Basics in ESXi" starting at page 5.

André

0 Kudos
A25Simon
Contributor
Contributor

Thanks Andre….

0 Kudos