For those of you who use VMware workstation 10 in running VMs on your desktop or laptop computer, you may have noticed that in certain situations or conditions things may get a bit sluggish when your workstation is under load or even for no reason at times. Recently, I loaded up a new Dell Precision Workstation M4800 laptop with 32G of RAM and SSD drives for both the system and VMs and expected stellar performance. VMs did run fairly well even when taxed. I noticed at times though, that performance would get sluggish in the guest OS. Both VMs were running Windows 8.1 as the guest operation system.
As you will no doubt find, performance tweaking in VMware Workstation is a must and can make the difference between sluggish VMs and those that make you think you are literally running on the host workstation. In doing some digging, I found several things to tweak both on the laptop host side as well as within the .vmx files of the VMs themselves.
The M4800 laptop I am running contains the switchable graphics from AMD. All in all, the switchable graphics are not my favorite just because they seem to be a little more flaky in stability compared to a single discreet graphics adapter. The AMD driver has the task of swapping back and forth between the onboard (usually Intel) adapter and the discreet adapater (Firepro in my case). So one of the first places I started in tweaking and looking at performance improvements was in the graphics arena.
Within the AMD catalyst control center, there are settings that allow you to specify the performance level of different applications where you can configure the applications to run at a certain performance level no matter if the laptop is on battery or plugged in or simply to select that the application always gets top level performance from the hardware.
VMware workstation of course can take advantage of the 3D capabilities of your graphics adapter which can certainly speed up performance in VMware workstation. So, with that in mind, I wanted to make sure the 3D settings for my graphics card were set to take advantage of full performance as oftentimes a combination of Windows and the driver can play around with these settings which leads to less than stellar performance.
Also, you want to make sure your VMs are set to use 3D acceleration as this is a setting that is usually turned on by default, but can get unset in certain cases.
Also, a very interesting blog post concerning VMware workstation tweaks can be found here: https://artykul8.com/2012/06/vmware-performance-enhancing/
I have tried the tweaks mentioned below and they definitely do seem to have an impact. Among the tweaks mentioned:
Tweak: Disable memory swap files .vmem files
In the VMware settings.ini file add the following line
mainMem.useNamedFile = "FALSE"
Settings.ini file is located file either at C:\ProgramData\VMware\VMware Workstation\or C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\folders, depending on your operating system.
For VMware Fusion on Mac and Linux instead of mainMem.useNamedFile you have to set mainMem.backing flag.
VMware Fusion Config files are located at:/Users/username/Library/Preferences/VMware Fusion/preferences and/Users/username/Library/Preferences/VMware Fusion/config
mainMem.backing = "swap"
Tweak: Disable log files for VM
Open your .vmx file in a text editor and add the following line:
logging = "FALSE"
Alternatively you can specify a different location to store the log file, if you ever need them:
log.filename = "c:\Windows\Temp\vm1.log"
Tweak: Disable Unity Mode
Unity might be a great feature for running virtual desktops operating systems, but it is not the most useful for virtualizing server OS. An annoying sign of enabled unity is GuestAppsCache or caches folder with a large number of files in its appData-subfolder. In order to disable it for your VM, open your .vmx file in a text editor and add the following line:
unity.enableLaunchMenu = "FALSE"
unity.showBadges = "FALSE"
unity.showBorders = "FALSE"
unity.wasCapable = "FALSE"
Tweak: Disk & Memory I/O Performance Optimization
Disable memory trimming:
MemTrimRate = "0"
Disable page sharing:
sched.mem.pshare.enable = "FALSE"
Disable snapshots if you are not using them and prefer full backups:
snapshot.disabled = "TRUE"
Disable scale down of memory allocation:
MemAllowAutoScaleDown = "FALSE"
Remote Desktop vs Console
Also of note after much trial and error, I simply have not been able to completely eliminate sluggishness when using the console of VMware workstation. However, what I have resorted to doing is using RDP into the Windows VMs that have experienced sluggishness and the problems have went away for me. This definitely reinforces the idea that it is a display adapter performance issue rather than a CPU memory issue. The RDP sessions so far for me have worked flawlessly as opposed to the console display.
The above is by no means all of the considerations for tweaking VMware workstation performance. There are many factors that need to be considered and each environment and host is certainly different. Whatever the case, use caution if you have critical workstation VMs before making any changes always have a backup as things can definitely go wrong when tweaking low level settings.