VMware optimizations

  |   5265  |  Post a comment  |  Optimizations
Many folders in pursuit of absolute performance had the good idea to replace the rather slow and inefficient Windows SMP client with Linux SMP clients using virtual machines. In general, for a Quad core processor, they use two virtual machines, each having two physical processing cores. What about if we could run one VM on a quad core, and save half the RAM allocated to two VMs?

Because of the use of virtual machines, the SMP clients often come into conflict with the GPU client on the machine (the scheduling priorities for the virtual machine are identical to a normal program, and always above the GPU core regardless of the setting used in either client).

Here are two tricks to solve these two problems. These tips have been tested and validated on VMWare Workstation 6.5.2.

A virtual machine on 4 cores ... it’s possible!

When configuring the virtual machine, there are only two choices for the number of CPUs used by the VM: one or two. But did you know that VMWare has access to four CPUs unofficially?

In this example, the default storage of virtual machines is set to "F: \ Virtual Machines \". This setting is located in the Edit menu> Preferences> Workspace tab. If you left the default settings when creating the VM, it should store its files in "F: \ Virtual Machines \ Name_of_the_VM \". In this article, we shall call our VM "Ubuntu 64-bit". The configuration files will be stored in "F: \ Virtual Machines \ Ubuntu 64-bit \"

For the following, shut down your VM and quit VMWare.

Go to the folder containing your VM and open the configuration file with your favorite editor: In the example, "F: \ Virtual Machines \ Ubuntu 64-bit \ Ubuntu 64-bit.vmx" ( "VMWare virtual machine configuration" in the file type displayed in Windows Explorer, if windows is not set to display the file extension).

The number of CPUs available in the VM is set by the parameter "numvcpus" ... This parameter accepts values from 1 to 4. Beyond 4, your VM will not start. If your configuration file contains the parameter “maxvcpus”, check that this value is 4 (or delete the line).

To use a Quad core, we will therefore have:

Code :
 numvcpus = "4" 


If you use the latest version of VMWare (Workstation 6.5.2 or Player 2.5.2) but your VM was created with an earlier version, also change the following line:

Code :
 virtualHW.version = "7" 


Save the file and restart VMWare. You should see the new number of CPUs in the summary of the VM, as in the following screenshot:


Click to enlarge the image.




Set the priority of the virtual machine.

The second stage of optimization is to set the priority of VM. Remember to set your GPU clients to low (console) or slightly higher (systray) and the SMP client in the VM to idle in the advanced configuration section of the client.

To create a global priority setting (applied to all virtual machines by default), go to the Edit menu> Preferences> Priorities tab. Adjust the settings as the following screenshot:


Click to enlarge the image.




For simplicity, Grabbed means that your VM is selected or displayed, and Ungrabbed means it is not selected or displayed. To have a priority low enough not to affect the GPU client, you need to the VM to be in the Ungrabbed, for example by minimising VMWare to the taskbar.

If you do not want to set this globally (using anything other than global settings is not recommended), you can configure this in the options for each VM (Options tab, Advanced element). You can also edit your configuration file as in the previous example, and add the following lines:

Code :
 priority.grabbed = "normal" 
priority.ungrabbed = "idle" 


You should get this screen once the change has been taken into account:


Click to enlarge the image.