Skip to content

Instantly share code, notes, and snippets.

@wpivotto
Created November 1, 2012 13:02
Show Gist options
  • Star 55 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save wpivotto/3993502 to your computer and use it in GitHub Desktop.
Save wpivotto/3993502 to your computer and use it in GitHub Desktop.
Maximize VMWare images performance
Insert the following code into the *.VMX file:
sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
prefvmx.useRecommendedLockedMemSize = "TRUE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE"
priority.grabbed = "high"
priority.ungrabbed = "normal"
* sched.mem.pshare.enable = "FALSE", by disabling memory sharing your guests will not share common memory blocks. Your VMware product will also stop comparing memory blocks
* mainMem.useNamedFile = "FALSE", doesn't use named-file - use for VMs on USB-disks or other slow disks. On Windows: useNamedFile= "FALSE" causes memory to be backed by the host's swap space.
* prefvmx.minVmMemPct = "100", fit memory into RAM. Whenever possible, avoid settings lower 100%.
* MemTrimRate = "0" , by disabling MemTrimRate, memory allocation inside the guest is faster because it doesn't take and give memory to the host os upon all requests.
* prefvmx.useRecommendedLockedMemSize = "TRUE" , this tells VMWare whether to use a fixed sized memory chunk or balloon and shrink memory as needed.
* mainMem.partialLazySave = "FALSE" , do not take snapshots in background
* mainMem.partialLazyRestore = "FALSE" , do not restore snapshots in background
* priority.grabbed = "high" , sets the priority for the VM in grabbed state
* priority.ungrabbed = "normal" , sets the priority for the VM in ungrabbed state.
@nponeccop
Copy link

It is the same location. C:\Documents and Settings\All Users\Application Data is a symlink (technically an NTFS junction)

@jellard1
Copy link

I believe your explanation for prefvmx.useRecommendedLockedMemSize = "TRUE" is misleading or inaccurate. Granted, I am trying to change VMware workstation preferences, not individual .vmx files.
I was trying to change to the setting below. (It required editing the /etc/vmware/config file or launching vmware via sudo -i vmware command to change preferences; but that's another issue.)

The center radio button was the setting that WAS selected:

Allow some virtual machine memory to be swapped

It was slowing down my VMs and couldn't disable it via Edit -> Preferences, so I had to edit the config.
So.. to the point:
"Fit all virtual machine memory into reserved host RAM" == prefvmx.useRecommendedLockedMemSize = "TRUE"
"Allow some virtual machine memory to be swapped" == prefvmx.useRecommendedLockedMemSize = "FALSE"

screenshot from 2016

@mhtvsSFrpHdE
Copy link

Hi, I made a vmx automatically editor for you

https://github.com/mhtvsSFrpHdE/vmware-vmx-editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment