Prevent creation of vmmem files in VMware (Windows)
VMWare creates .vmem
files to back the guest RAM. On the host this causes disk thrashing especially during powering on and off the guest.
Add the following lines to the .vmx
file to prevent creation of .vmem
files. This will reduce disk IO and VM performance will improve especially on non-SSD disks.
prefvmx.minVmMemPct = "100"
MemTrimRate = "0"
mainMem.useNamedFile = "FALSE"
sched.mem.pshare.enable = "FALSE"
prefvmx.useRecommendedLockedMemSize = "TRUE"
- http://faq.sanbarrow.com/index.php?action=artikel&cat=14&id=50&artlang=en
- http://faq.sanbarrow.com/index.php?solution_id=1075
- http://www.sanbarrow.com/vmx/vmx-config-ini.html
- https://superuser.com/questions/306655/windows-7-kills-vmware-performance-by-disk-caching
- https://gist.github.com/wpivotto/3993502
- https://communities.vmware.com/thread/205396
- https://communities.vmware.com/thread/462098
- https://communities.vmware.com/thread/510562
- https://communities.vmware.com/thread/564465
I have a Windows 11 VM guest on a Windows 11 host running VMWare Workstation 17.6.2 and I have been experiencing random crippling HDD spikes on the host HDD that contains the VM. The VM is barely manageable while this is occurring. I ran ProcMon on the host and found the vmware-vmx was constantly reading the VM's vmem file and causing I/O issues on the HDD. On the guest, I see it's using 100% CPU usage across multiple processes but RAM and HDD are nominal. I could have simply moved the VM to one of my SSDs but I didn't want to destroy the SSD with the same constant vmem file reads.
I added the above entries and now the VM is performing much better and not randomly locking up due to vmem-related host HDD I/O issues.