Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Configuring Linux Host for Optimal Performance and Virtual Machine Stability (844)

Details

How can I configure my Linux host to improve the performance of my virtual machines?

Solution

Follow the suggestions below to improve your Linux host's performance.

  1. If you are experiencing problems with swapping memory on your Linux host, try both of these suggestions.

    • Remount the /dev/shm (shared memory) partition to be at least the size of physical memory, and larger if possible. For example, with a Linux host that has 4GB of RAM, we recommend that /dev/shm be at least 4GB (and larger, if possible.)

      To remount /dev/shm, use the following command:
      mount -o remount,size=G /dev/shm

      For example, on a Linux host with 4GB of RAM:
      mount -o remount,size=4G /dev/shm

      Or, even better:
      mount -o remount,size=5G /dev/shm

      To make this change persistent between times when you reboot your Linux host, change the mount entry for /dev/shm in /etc/fstab by adding the size=G option. For example:
      none /dev/shm tmpfs size=5G 0 0

    • Change the temporary directory for backing store files (for example, ram.0, ram.1, ram.2, and so forth) from /tmp (the default) to /dev/shm.

      Add the following line to the (/etc/vmware/config) file:
      tmpDirectory="/dev/shm"

      If you decide to mount /tmp in /dev/shm, keep in mind that the amount of memory allocated to the virtual machine is also the amount of disk space on /tmp that the virtual machine requires. See also step 4 below.



  2. If you are not experiencing host swapping problems and your Linux host uses the RAM-based tmpfs file system for temporary storage, change the location the VMware software uses for temporary storage to a directory on a local hard drive. The VMware application does not function properly when using tmpfs for its temporary storage and Signal 7 errors sometimes occur.

    You can make this change in the /etc/vmware/config configuration file by adding the following line:
    tmpDirectory = "////"

    Be sure that the specified directory is on a local hard drive and that the user running the VMware software has write permissions for that directory.

    Caution: This setting conflicts with the setting listed in step 1 above, so only use this suggestion if you are not having any problems with swapping memory on your Linux host.

  3. Virtual machines with disks in independent-nonpersistent mode (nonpersistent mode for GSX Server 2.x or Workstation 3.x) should save their redo log files to a directory other than /tmp (which is the default). You can do this by choosingVM>Settings>Options, then specifying the path to a local filesystem directory in the entry field under Working directory. For GSX Server 2.x or Workstation 3.x, choose Settings > Configuration Editor, then select Misc and specify the path to a local filesystem directory for the REDO log directory.

    Note: This is not necessary for virtual machines with disks in normal mode (or undoable or persistent modes for GSX Server 2.x or Workstation 3.x).

  4. Make sure that the /tmp partition is large enough and has ample free space. Linux distributions reserve about 10% of /tmp for use by root processes only, so when /tmp is at 90% capacity, non-root applications cannot write to it.

    If you cannot increase the size of /tmp, then you may want to set TMPDIR in the users' environments. The VMware application may put some log files in /tmp; for example, the serverd and authd log files. Another option is to mount /tmp on a local disk that has more disk space. Don't mount /tmp on a network share as this could cause performance problems.

  5. If your host is running a kernel in the 2.4.0 to 2.4.17 series range, ensure that the swap partition is at least 2 times the amount of physical memory on the machine. This is the value recommended by most Linux distributions (though they do not always configure that by default).

Making these changes should improve performance, especially when running VMware software on a Linux host that has 3GB or more memory.

Otherwise, you may experience one or more of the following problems when trying to run multiple virtual machines:

  • The VMware application fails with ASSERT error F(770):475.
  • The VMware application fails with a Signal 7 error.
  • Virtual machines terminate unexpectedly.
  • Virtual machines and the host machine exhibit poor performance.


These problems occur when the Linux host is not configured appropriately for heavy memory use, especially heavy shared memory use. This is the case with default Linux configurations.

Keywords

.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 11 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 11 Ratings
Actions
KB: