Scenario
We have a VMware ESXi Server with 512GB RAM and we have 25 VMs with 64GB RAM with "0GB" reservation memory for VMs. They don't use all of their resources but we need to do this because they use all of their memory(64GB) once a day. When they do this ESXi gives VM 64GB and tries to reserve it for VM. I know ESXi is managing memory by ballooning and other ways but it shows used memory in the "Host Mem" section of VM 64GB.
ProblemWe want to say ESXi if a VM didn't use memory for 10Min reclaim all reserved memory(Host Mem parameter). with powercli, VMtools, Linux script, a config and etc.
I know
I know about ballooning but we need to reclaim memory manually if possible. Or force ESXi to reclaim unused memory very fast.
What's the reason for reclaim memory manually?
If the ESXi hosts get into memory contention (more precisely, much earlier) the hosts start reclaiming (page sharing, ballooning, compression, etc.) memory automatically.
Thank you vMarkusK1985,
Our development team states that VMs are very slow some times and it is because of "Host mem" usage parameter and we need to find the problem to fix it.
Do you already have active ballooning, compression and swapping on your VMs?
I would not be surprised. The numbers you mentioned show a hight memory overcomitment.
Are you able to add more hosts to the cluster?
This?
there ist no substitute for memory except to add more memory.
if the vm´s don´t fit into the host memory you have the risk of performance issues. don´t allow the host to do other memory optimizations than tpm or compression. ballooning or swapping is always an indicator of insufficient memory
a typo - i mean tps
Yes I checked hosts and ballooning, compression are enabled and also I checked some of VMs had done ballooning and compression. Swapping is enabled and it makes .vswp files beside VM files.
Yes we have so many VMs. Is there formula or best practice to calculate memory overcomitment or it's experimental?
We have already some other hosts and I will try to convence CTO to do this If i can find the exact problem point!
Does Ballooning, Compression, and Swapping happen for your VMs (the .vswp file exists per default when no memory reservation is done)? You can check the Memory Performance Metrics of the Host or the VMs get a good insight.
If one of these Memory saving methods (especial Compression and Swapping) hits your VMs you can be sure there is too much memory overcommitment. With the current server sizings and memory prices, in most ent. environment memory overcommitment is not usual (or only on a small scale).
You already have the exact problem point, your developers are not happy. For exact numbers check the Memory Performance for Ballooning, Compression, and Swapping of the VMs.