Speeding up VMWare

I was working with a very large VMWare image today, containing Oracle E-Business Suite R12.  The image is located on an external USB drive, simply because it is too large to fit on the internal disk on the available host machine.

It was running very, very slow, in fact so slow that it was completely unusable.

A little bit of research turned up some settings that can be used in this kind of situation.  The problem seems to be that VMWare creates a file in the same directory as the configuration (vmx) file where it stores the memory of the running guest machine.  This means there is a lot of I/O contention on the USB drive, not something that a lot of USB drives are very good at handling.

Happily, there is an option to make VMWare use RAM on the host to contain the guest’s memory, and to create any backing files on the main disk instead of the external disk.

Listed below are the settings I discovered and added into my VMX file.  In addition to this, I changed the option in VMWare Workstation’s Edit, Preferences menu option, in the Memory tab, to keep all of the guest memory in the host RAM.  I also tried this on VMWare Server.  The option is in a different place, but it does the same thing.

mainMem.useNamedFile=FALSE      ### this line is for Windows hosts
mainMem.backing="unnamed"       ### this line is for Linux hosts
sched.mem.pshare.enable = "FALSE"
MemTrimRate = 0
prefvmx.useRecommendedLockedMemSize = "TRUE"
prefvmx.minVmMemPct = "100"

The result of these changes was a dramatic performance improvement.  Actions that were previously taking several minutes before timing out or failing were now completely successfully in just seconds.

I am posting these settings here in the hope that they help others too.  I know I will be using them again next time I need to run a large VM!


About Mark Nelson

Mark Nelson is an Architect (an "IC6") in the Fusion Middleware Central Development Team at Oracle. Mark's job is to make Fusion Middleware easy to use in the cloud and at home, for developers and operations folks, with special focus on continuous delivery, configuration management and provisioning - making it simple to manage the configuration of complex environments and applications built with Oracle Database, Fusion Middleware and Fusion Applications, on-premise and in the cloud. Before joining this team, Mark was a senior member of the A-Team since 2010, and worked in Sales Consulting at Oracle since 2006 and various roles at IBM since 1994.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

8 Responses to Speeding up VMWare

  1. jerrycashman says:

    Very interesting… do you think these settings would also help with a smaller VM, eg: of around the 1.5 GB size on an external USB ?

    • markxnelson says:

      Worth a try 🙂

      Actually, the other VM that I alluded to, the one on VMWare Server, is a very similar one to the one that I think you may be thinking of…

  2. iris9198 says:

    Thanks for the article, I am new to VMWare & got the same problem here….

    maybe it is silly question….but do I have to re-start VMware workstation after changing those settings.

  3. THANK YOU SO MUCH. this code really helped, my vm was eating up all my SSD space when it was running because I set the RAM allocation to 20GB and had very little SSD space left to begin with. now with your code added to the vmx file my SSD is no longer being drained of any space when my vm is running. thanks!

  4. Pingback: Tối ưu hóa môi trường development cho SharePoint P1

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s