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
From my observations, whether
.vmemfiles are disabled does not have an impact on performance (unless you're really short in disk space and need to save several GBs from the.vmemfile).But disabling
.vmemfile will cause the VM fail to restore from suspended state on occasion. The error I am seeing is "could not create anonymous paging file for <your VM's memory size> MB". When the error occurs, the saved VM state is dropped and data is lost; no chance to retry restoring.In light of this, I have stopped using the method described in this Gist.