VMware Communities
BillReynolds
Enthusiast
Enthusiast
Jump to solution

.vmem files thrashing my HDD?

I talked about this in a previous thread, but never really got into it. When I'm running a VM, my disk activity skyrockets to over 100%, and my PC freezes from a period of 1-15 Minutes. I looked into the Resource Monitor of my host, and it turns out that the .vmem file of the VM that I'm running (C:\Users\Bill\Documents and Settings\Virtual Machines\*Name of VM that I'm currently running*\XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.vmem) is doing something that makes my Disk Activity skyrocket and eventually thrash. But the REAL question is WHAT? WHAT is it doing to make my disk thrash? WHY is it doing that? WHAT can I do about it?

1 Solution

Accepted Solutions
BillReynolds
Enthusiast
Enthusiast
Jump to solution

Well, I (maybe) might've just solved my own problem once again. I added the following to all of my .vmx files:

prefvmx.minVmMemPct = "100"

MemTrimRate = "0"

mainMem.useNamedFile = "FALSE"

sched.mem.pshare.enable = "FALSE"

prefvmx.useRecommendedLockedMemSize = "TRUE"

...and the .vmem files were never seen again (hopefully). I'll see if the high I/O stops happening now.

View solution in original post

Tags (1)
10 Replies
AdrianTT
Enthusiast
Enthusiast
Jump to solution

Hi Bill,

The vmem file is "The virtual machine's paging file, which backs up the guest main memory on the host file system. This file exists only when the virtual machine is running, or if the virtual machine has crashed."

The disk thrashing is probably due to commitment (assigning too much memory) to the Guest VM then is physically available on your machine. VMWare Workstation will "page" the memory out to disk to ensure that you still have

To prevent this behaviour you can tweak how VMWare Workstation deals with memory under Edit > Preferences > Memory

pastedImage_0.png

If you set "Fit all virtual machine memory into host RAM" then this should prevent the trashing; also you could reduce the RAM allocated to your Guest VM. Its a bit of balancing act between getting the most out of your machine and thrashing it but by adjusting these settings you should be able to find a workable configuration that doesn't thrash your disks when you machine is under resource pressure.

Hope this helps; please mark this as complete or helpful if this solves your issue.

Kind regards,

Adrian

Please consider marking this answer "correct" or "helpful" if you think your query have been answered correctly. Cheers,
a_p_
Leadership
Leadership
Jump to solution

Something else you may want to look at is your A/V application, to see whether it start scanning the newly created .vmem file.

André

0 Kudos
BillReynolds
Enthusiast
Enthusiast
Jump to solution

Neither worked for me.

0 Kudos
AdrianTT
Enthusiast
Enthusiast
Jump to solution

Hi Bill,

Hmm; if you have the reserved memory set equal to the guest and the Fit all memory virtual memory into reserved host RAM set then I would not expect paging to occur; another thing you may want to try is preventing the virtual machine from going into Suspend/Sleep (see: Disabling the suspend feature for a virtual machine in VMware Fusion and VMware Workstation (2056501...). If you want to reduce storage contention on your System Disk you may also wish to consider deploying the VM's on an external drive.

Kind regards,

Adrian

Please consider marking this answer "correct" or "helpful" if you think your query have been answered correctly. Cheers,
0 Kudos
BillReynolds
Enthusiast
Enthusiast
Jump to solution

I let the system reserve a cool 4192MB of RAM (Thus allowing anything to run up to 4096MB), and that done fixed it (though I would need to restart my suspended VMs or else the thrashing would continue when I run those VMs).

0 Kudos
BillReynolds
Enthusiast
Enthusiast
Jump to solution

Sorry, you should expect that from a person who's on the internet 24/7. Anyway, in other words, how to I prevent the memory from swapping to the .vmem file?

0 Kudos
AdrianTT
Enthusiast
Enthusiast
Jump to solution

Hi Bill,

if you are have set VMWare Workstation to fit all virtual memory into the reserved host RAM, are not over committing your physical memory and do not have the VMs suspending/sleeping you should not see swapping. Others on the forum may have other suggestions however if you are still seeing thrashing of your disk the only other suggestion I can make is to move the VMs to storage with more IO available (an external SSD for example).

Sorry I cant provide any further assistance,

Kind regards,

Adrian

Please consider marking this answer "correct" or "helpful" if you think your query have been answered correctly. Cheers,
0 Kudos
BillReynolds
Enthusiast
Enthusiast
Jump to solution

Well, I (maybe) might've just solved my own problem once again. I added the following to all of my .vmx files:

prefvmx.minVmMemPct = "100"

MemTrimRate = "0"

mainMem.useNamedFile = "FALSE"

sched.mem.pshare.enable = "FALSE"

prefvmx.useRecommendedLockedMemSize = "TRUE"

...and the .vmem files were never seen again (hopefully). I'll see if the high I/O stops happening now.

Tags (1)
BillReynolds
Enthusiast
Enthusiast
Jump to solution

You know what?

*Sets above post as correct answer*

0 Kudos
artm69
Contributor
Contributor
Jump to solution

I made VM's in Win7 VMWare Workstation 11, compatibility with Workstation 10. Played back in Win7, the behavior is correct without adding any lines to vmx - all apportioned RAM is used by the VM.

 

When playing the same VM in Win10 Workstation 15.5.6, compatible to Workstation 10 as the original VM, the only solution is to add the lines to vmx. Setting the preferences to use up all RAM does not work.

Strange.

 

Perhaps making a WS 15 VM and running it with just the RAM preferences will work, but I have not tried it as all my VMs are WS 10.

0 Kudos