ID #1077

Tuning guide - finetuning memory

Memsize 

The amount of virtual memory assigned to a VM is defined by the parameter
memsize = "2048"
If this value is not defined the default
memsize = "32"
will be used.
If the value is not a multiple of 4 the VM can not start and will display an error message.

The amount of virtual RAM has significant effects on the

  • performance of the VM
  • responsiveness of the VM
  • time required to take a hot snapshot
  • time required to suspend or resume the VM
  • time required to start and stop the VM
  • required disk-space
  • impact on the host and other running VMs

This means that virtual RAM does not scale like real RAM in a real machine.
Virtual RAM of the VM is just another file which has to be stored somewhere to the host so obviously
smaller files can be used faster than larger files.
The results are somewhat unexpected - in a VM assigning less RAM makes the VM feel more responsive.

Older Workstation versions could allocate a maximum of 1600 Mb per VM effectively inside the real RAM.
This limitation is still part of the code of current Workstation. This can be noticed on 32 bit Windows hosts.
On a 32 bit Windows host WS assigning 1536 Mb to a VM results in a vmware-vmx.exe process that uses about that much of the real RAM. The same VM - this time with 2Gb of virtual RAM - and now the vmware-vmx.exe process uses just a few hundred and swaps out the rest.

That said the simplified recommendation is

  • for real machines : as much RAM as possible performs best
  • for virtual machines on 32bit hossts : not more then required and if possible less then 1600 Mbs performs best
  • for virtual machines on 64 bit hosts : not more then required  performs best

GUI: Menu > VM > Settings > Memory


Memory trimming

A VM "feels" snappy and responsive if large amounts of the virtualRAM are allocated in the real RAM of the host.
This will become a problem if very many VMs are used at the same time so Workstations uses different procedures
to make sure that active VMs get as much free real RAM as possible while idle VMs use as little real RAM as necessary.

Memory-trimming tries to detect unused virtualRAM and give it back to the host.
It has only small effects on performance.
To improve responsiveness of a VM you can disable it by using
MemTrimRate =" 0”
If you do not set this parameter the default
MemTrimRate = “30”
will be used on current Workstation 7.

This option is also available via the UI see
GUI : Menu > VM > Settings >Options > Avanced > Disable memory page trimming


Page Sharing

Page Sharing tries to safe resources by allocating dublicate pages in real RAM only once.

It has only small effects on the performance of a single VM but is more useful if several similar VMs are used.
To improve responsiveness of a single VM you can disable it by using

sched.mem.pshare.enable = “FALSE”

If you do not set this parameter the default
sched.mem.pshare.enable = “TRUE”
will be used.

GUI : not available  - to set this option for all VMs use this parameter in the config.ini



Reduction of vRAM at start-time if necessary ...

Old Workstation versions would not start a VM if the host does not have enough free memory.
Newer versions now ask at start if you want to reduce the amount of virtualRAM to be able to start the VM.
This new feature may have bad side-effects if used with current Windows-OS as a reduction of the amount of vRAM may trigger a new Activation.
If you want to prevent possible Activation issues you can disable this feature by setting.
MemAllowAutoScaleDown = "FALSE"
if you do not set this - the default
MemAllowAutoScaleDown = "TRUE"
will be used
.

GUI : not available   - to set this option for all VMs use this parameter in the config.ini


Tags: MemAllowAutoScaleDown, MemTrimRate, sched.mem.pshare.enable

Related entries:

You can comment this FAQ