Thin Client and Virtual Machines Thread, Linux VM generates large swap file when there is still memory available ? in Technical; Hi All,
My ESXi Specs:
Dual QuadCore
Xeon @ 2.33 GHz (2 x 4 Core)
32 GB DDR2 RAM
Running ...
I’ve got a strange problem, How come my ESXi got so large swap
file size ~ approx. 3.5 GB while the amount of total RAM is still not
100 % used.
I've assigned the following specs as in the screenshot (4 vCPU for better performance).
Can anyone explains why this VM still using swap file?
FYI: The VMware tools is not installed in this VM.
When I look at the Guest memory % usage it doesn't make sense to me that this host running slow due to the Swap file created (ESXi swap as well as the Internal VM swap file).
The VM that i highlighted is the slowest with big swap file created. --> See the screenshot attached.
Hi Andy,
Does this means that by not having VMware tools installed the memory over allocation is killing the host by writing into the ESXi swap file ?
VMware tools provides a memory balloon driver, which can be called to force the VM to page internally when ESX host is short of memory (use VM's own internal swap/page mechanism).
ESX only writes to swap file as last resort. Make sure your machine does need 4vCPU's and 8Gb memory, reduce now and add later when/if needed.
I have a heavily loaded desktop box that was suffering similar issues - in that i'd open my apps, run my VMs, and I would not need a lot more RAM after that, but linux appeared to be hoarding some This was resulting in a lot of swapping, and my disk aint so fast. So I tuned "swappiness" down from its normal value (60) to 30. This seemed to limit the growth of swap, at the expense of buffering files from disk. Seems to work well. 17 days later I will have to reboot to claim some of the ram firefox leaks back though
I have a heavily loaded desktop box that was suffering similar issues - in that i'd open my apps, run my VMs, and I would not need a lot more RAM after that, but linux appeared to be hoarding some This was resulting in a lot of swapping, and my disk aint so fast. So I tuned "swappiness" down from its normal value (60) to 30. This seemed to limit the growth of swap, at the expense of buffering files from disk. Seems to work well. 17 days later I will have to reboot to claim some of the ram firefox leaks back though
As root:
Code:
echo 30 >/proc/sys/vm/swappiness
Thanks Tom, it's good to know that you can also provide a twaek for the VM :-)