Site icon Virtual Maestro

VMware vSphere 7.x Memory Reclamation-Part 2: Mem.MemMinFreePct


So here we are with another post in this series. In previous post we discussed basics of memory virtualization concepts and the need for memory reclamation. In this post we will explore ESXi host memory states, sliding scale method of calculating Mem.MemMinFreePct.

As discussed in previous post, multiple VMs that run on ESXi host, share the memory resource of an ESXi host. As the demand grows across multiple VMs, in the situation such overcommitment, it is possible that ESXi server may end up in contention for memory resource. Eventually it should not be the situation that entire physical memory is consumed by VMs. There should be certain amount of free memory available and guaranteed to the hypervisor.

What is Mem.memminfreepct value?

Mem.memminFreePct value determines the amount of physical memory that VMKernel should keep free on ESXi host to ensure stability of the system. Free memory on ESXi host below this value, may result in memory contentions on the host.

ESXi host uses a sliding scale method to determine the Mem.MemMinFreePct value. By using a sliding scale, a sensible value is calculated regardless of the memory size of the ESXi host. This is done automatically as you can see in above screen shot, the default value is set to 0 which means automatic calculation.

You can use tools such as ESXTOP to check the Mem.MemMinFreePct value.

Mem.MemMinFreePct is not a fixed value, instead it is auto-calculated using the sliding scale as mentioned earlier and the Mem.MemMinFreePct value depends on the host memory configuration.

That being said, it is time to understand how the calculations are done.

Sliding Scale Method

Below table can help to calculate the Mem.MemMinFreePct value.

PercentageMemory Range
6%First 4 GB (0-4 GB)
4%Next 8 GB (4-12 GB)
2%Next 16 GB (12-28 GB)
1%Remaining memory after 28 GB

This is better understood with an example. Let us take an example of ESXi host with 100 GB Memory to understand sliding scale calculation of Mem.MemMinFreePct.

Now we just need to calculate sum of all these values.

Mem.MemMinFreePct = 245 + 327 + 327 + 720

Mem.MemMinFreePct = 1619 MB

Once the Mem.MemMinFreePct is calculated, ESXi host uses it to further calculate multiple memory thresholds to determine memory states.

Memory states and their thresholds:

There are five different memory states that are calculated based on Mem.MemMinFreePct. Below are the memory states in ESXi host.

Below table helps us to understand at which threshold these memory state are active in ESXi host.

Memory stateMemory Threshhold
High300% of Mem.MemMinFreePct
Clear100% of Mem.MemMinFreePct
Soft64% of Mem.MemMinFreePct
Hard32% of Mem.MemMinFreePct
Low16% of Mem.MemMinFreePct

So based on our example above for an ESXi host with 100 GB memory,

Based on which memory state is active, respective memory reclamation techniques are initialized by the ESXi host.

ESXTOP: Memory

Below table explains, which memory reclamation techniques are associated with these memory states.

Memory StateReclamation Techniques
HighTPS-small Memory pages (Large memory pages are Scanned only)
ClearTPS (Large memory pages)
SoftTPS + Balloonning
HardTPS + Compression + Swap
LowTPS + Compression + Swap + Block

Wrapping Up:

In this post we discussed, Mem.MemMinFreePct value, Memory states in ESXi host and sliding scale method to calculate Mem.MemMinFreePct along with thresholds for memory states. We also briefly talked about reclamation techniques associated with Memory states. This discussion is brief overview of how ESXi host reacts to the contention. From the next post, we will start exploring each of the memory reclamation technique starting with Transparent Page Sharing (TPS).

Exit mobile version