Windows 7 kills VMWare performance by disk caching

cacheperformancevmware-workstationwindows 7

We're running Windows 7 Enterprise 64-bit SP1 on Dell Precision T3500's (Xeon E5630 @ 2.53GHz, 4GB of RAM). On top of this is VMWare Workstation 7.1.4, up to date. Running in a VM is Windows XP Professional 32-bit SP3. VMWare is configured to allocate 2GB of RAM for the guest.

Performing nearly any operation inside the VM is very slow; even scrolling a text file can require seconds, with very obvious associated disk activity. A quick check of task manager and resource monitor from the Windows 7 host shows that VMWare is allocated a significant chunk of virtual memory, but I think it's all being paged out, and as soon as I start scrolling through the text file, I quickly hit something like 140 hard faults per second and stay there.

Older versions of VMWare on far more ancient hardware (Pentium 4-vintage) running a Windows XP host never exhibited these particular symptoms. Is there some way to make Windows 7 less aggressive about paging VMWare out of memory, or is there some solution that reduces the amount of paging to disk required? It's entirely possible I simply have something misconfigured, but I haven't fiddled with a lot of settings. Any suggestions would be appreciated, thanks.

Best Answer

See the last entry here http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008885

I have seen huge improvements to VM performance after making this change. Just make sure you have enough memory on your host.

Edit the virtual machine settings to reduce I/O usage by using more host memory:

Adding these settings to a virtual machine can reduce the I/O load on the hard disk, however these adjustments require additional memory on the host. Only add these settings if there is sufficient free memory on the host to accommodate all the memory allocated to the virtual machine, otherwise you may cause a memory starvation condition that can reduce performance of all the running virtual machines or possibly affect the host operating system. Use these settings with caution.
Open the .vmx file for the affected virtual machine while it is powered off. Add the following lines to the file using a text editor. For more information, see Editing the .vmx file of a VMware Workstation and VMware Player virtual machine (2057902)

Note: If you are using VMware Server, you may need to restart the VMware Authorization Service (vmware-authd) for changes to take effect.

MemTrimRate = "0" 
mainMem.useNamedFile = "FALSE"
sched.mem.pshare.enable = "FALSE" 
prefvmx.useRecommendedLockedMemSize = "TRUE"

Note: If you are using a Linux host, use the following entry instead of mainMem.useNamedFile = "FALSE". The mainMem.useNamedFile entry only applies to Windows Hosts.

mainmem.backing = "swap"
Related Question