Site icon UnixArena

How to calculate the vSphere’s VM memory usage ?

To understand, VMware’s memory management required some sort of skills. Because it had bounded  with many technologies like sharing the memory between virtual machines(TPS) , compressing the memory content, Eliminating the duplicate memory content etc…As a Unix/Linux/Windows admin , we can login to guest VM and check the current memory usage at the VM level. But to understand, how the VM is getting the physical memory at the ESXi level , You have to login in to vSphere Client and check the Resource Allocation tab.

Most the members get confused after seeing the VM’s resource allocation tab from vSphere Client. This article is going t0 explain how VMware is calculating the virtual memory and how to find the VM’s real memory usage.

Memory Usage from VM guest Level

Login to the guest OS and see how much memory in use .VM- Redhat Linux

# top
top - 10:45:26 up 243 days, 22:01,  1 user,  load average: 0.02, 0.02, 0.00
Tasks: 143 total,   1 running, 142 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.0%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   5858188k total,  5792276k used,    65912k free,   245984k buffers
Swap:  2064376k total,       96k used,  2064280k free,  4968504k cached
# free -m
             total       used       free     shared    buffers     cached
Mem:          5720       5656         64          0        240       4852
-/+ buffers/cache:        564       5156
Swap:         2015          0       2015
#

According to the VM, physical memory is used 5656MB. (5.5GB~)

Memory usage from vSphere Client’s Resource allocation tab

Login to vSphere Client and Select host and clusters . Just find the VM and select the Resource allocation table.

VMware vSphere Client – VM Memory usage

After looking the Resource allocation tab, confusion begins about the VMware memory management.

We will see the memory terms in VMware vSphere and how it works  ?

VM-Physical Memory

 

Host Memory VS Guest Memory

 

Overhead Consumption

 

Consumed Memory

Please go through this article to know more about Shared,Swapped,Compresses and Ballooned Memory. 

The conclusion is that VM’s memory usage(5.5GB~) is matching to the consumed memory in vSphere Client. (5.49GB~).So you no need to calculate other fields value.

Summary:

Field Description
Private Amount of memory backed by host memory and not being shared.
Shared Amount of memory being shared.
Swapped Amount of memory reclaimed by swapping.
Compressed Amount of memory stored in the virtual machine’s compression cache.
Ballooned Amount of memory reclaimed by ballooning.
Unaccessed Amount of memory never referenced by the guest.
Active Amount of memory recently accessed.

Hope this article provides some idea about VMware memory management. We will see the Guest Memory in details in upcoming article.

Share it ! Comment it !! Be Sociable !!!

Exit mobile version