KellyOlivier
Enthusiast
Enthusiast

VM swapping performance question

ESX host is 3.5. M600 blade with 32 GB RAM. Host has 4 VMs each with 2 vcpu and 8GB RAM. 1 VM shows memory swapped average as 2.4 GB. When esxtop is run on the host it shows the host swapping this exact amount of memory as well. The VM shows to be using an average of 5% of memory. I have also given it a 4GB reservation which had no effect on performance whatsoever. The swap out is about 4GB. Is the only fix for this more physical memory to the host? Why doesn't this draw an alarm as this obviously negatively affects performance?

0 Kudos
4 Replies
KellyOlivier
Enthusiast
Enthusiast

Alright, I am adding to the madness here...hoping I get some feedback. Also, giving this thread a bump at the same time.

Just for kicks, I gave two VMs a 3 GB limit. I also tried giving the VM a 8 GB reservation and neither of these have caused the VM to stop swapping. You can actually look up into esxtop and see 18 GB free and this VM is still swapping!

At this point do you think I should just call VMware and log a ticket?

0 Kudos
lreesey-old
Enthusiast
Enthusiast

Try removing the reservations all together. Also, remember there is memory overhead for CPU/console/etc.

0 Kudos
naveenvm
Enthusiast
Enthusiast

Hi Kelly,

Swapping of memory is a predefined process which starts as soon as there is overcommitment. To force a VM not to swap memory from its swap file, we have two options - reservations and affinity.

Remember, reservation comes into effect only after we power on the VM. So the workaround would be - power off the VM - >Give the reservation as 8GB - > and power on the VM again.

Also please check now, there should be no .vswp file created (because the configued memory size for VM is also 8GB). Now there can not be any swapping because no swap file is present there for swapping.

If the host is not having 8GB of memory free, it won't allow you to power on the VM with the current reservation.

Regards

NUTZ VCP 3.5 (Preparing for VCP 4)
0 Kudos
KellyOlivier
Enthusiast
Enthusiast

Ok I did remove the reservations. I never intended to even use them at all. I was only using them for troubleshooting. I installed vmware tools on the other two and now instead of any swapping going on ballooning is taking place from the other two VMs on the host.

The weirdest part of this is that the host shows 20GB FREE. I don't understand why swapping or balooning happens at all with this much free memory. Am I misunderstanding esxtop readings?

0 Kudos