Why is Java on vCenter using most of the Memory? and How to fix it

So after installing a new 2008 R2 vCenter 5.5 I look at the memory usage and found it was using 88% of the memory.  I open up task manager and find Java running with 7 processes using as high as 1.2GBs of memory.  So like always I did a google search and found this vmware article.

Why?Configuring Tomcat server settings in VMware vCenter Server 5.1 and 5.5 (2021302)

Purpose

This article provides information on configuring Tomcat server settings in vCenter Server 5.1 and 5.5.Note: This is a not a comprehensive guide. For more information, see the vSphere 5.x documentation. If there is a discrepancy between the documentation and this article, assume that the documentation is correct.

Resolution

Starting with vCenter Server 5.1, VMware Tomcat Server settings can no longer be configured through the Windows user interface at Start > Programs > VMware > VMware Tomcat.vCenter Server 5.1 uses VMware vFabric tc Server, an enterprise version of Apache Tomcat 7. Unlike Tomcat version 6, which is used with earlier versions of vCenter Server, Tomcat version 7 does not provide a control panel in the Windows user interface. Instead, you configure Tomcat by editing configuration files manually.You can adjust the JVM maximum heap size for vCenter Server, vCenter Single Sign-On, vCenter Inventory Service, and Profile-Driven Storage Service.

This table provides the JVM heap size recommendations:

vCenter Server 5.1:

vCenter Server Inventory VMware VirtualCenter Management Webservices (tc Server) Inventory Service Profile-Driven Storage Service
Small inventory (1-100 hosts or 1-1000 virtual machines) 1 GB 3 GB 512 MB
Medium inventory (100-400 hosts or 1000-4000 virtual machines) 2 GB 6 GB 1 GB
Large inventory (More than 400 hosts or 4000 virtual machines) 3 GB 12 GB 2 GB

vCenter Server 5.5:

vCenter Server Inventory VMware VirtualCenter Management Webservices (tc Server) Inventory Service Profile-Driven Storage Service
Small inventory (1-100 hosts or 1-1000 virtual machines) 512 MB 3 GB 1 GB
Medium inventory (100-400 hosts or 1000-4000 virtual machines) 512 MB 6 GB 2 GB
Large inventory (More than 400 hosts or 4000 virtual machines) 1024 MB 12 GB 4 GB

Note:After adjusting the JVM heap size in the wrapper.conf file, VMware recommends restarting the VirtualCenter Management Web services. For more information, see Stopping, starting, or restarting vCenter services (1003895).

Java setting options and file locations for vSphere services

  • VirtualCenter Management WebServicesConfiguration file location:installation_directory\VMware\Infrastructure\tomcat\conf\wrapper.conf

    Heap size parameter:

    wrapper.java.additional.9="-Xmxheap_sizeM"

  • vCenter Single Sign-On (vSphere 5.1)Configuration file location:installation_directory\VMware\Infrastructure\SSOServer\conf\wrapper.conf

    Heap size parameter:

    wrapper.java.additional.9="-Xmxheap_sizeM"

  • vCenter Single Sign-On (vSphere 5.5)Configuration file location:installation_directory\ProgramData\VMware\CIS\runtime\VMwareSTS\conf\wrapper.conf

    Heap size parameter:

    wrapper.java.additional.9="-Xmxheap_sizeM"

  • vCenter Inventory ServiceConfiguration file location:installation_directory\VMware\Infrastructure\Inventory Service\conf\wrapper.conf

    Heap size parameter:

    # Maximum Java Heap Size (in MB)
    wrapper.java.maxmemory=heap_size

  • vSphere Profile-Driven StorageConfiguration file location:installation_directory\VMware\Infrastructure\Profile-Driven Storage\conf\wrapper.conf

    Heap size parameter:

    # Maximum Java Heap Size (in MB)
    wrapper.java.maxmemory=heap_size

  • vSphere Web ClientConfiguration file location:installation_directory\Program Files\VMware\Infrastructure\vSphereWebClient\server\bin\service\conf\wrapper.conf

    Heap size parameter:

    ########
    # JVM Memory
    ########
    wrapper.java.maxmemory=heap_size

  • VMware Log BrowserConfiguration file location:installation_directory\Program Files\VMware\Infrastructure\vSphereWebClient\logbrowser\conf\wrapper.conf

    Heap size parameter:

    ########
    # JVM Memory
    ########
    wrapper.java.maxmemory=heap_size

For more information, see the Configuring VMware Tomcat Server Settings in vCenter Server section in the vSphere Installation and Setup guide and vSphere 5.5 Documentation Center

VMware KB: Disabling the HotAdd/HotPlug capability in ESXi 5.x and ESXi/ESX 4.x virtual machines

This fixed an issue with Server 2008 having the nic start up slow

Symptoms

  • NICs and SCSI controllers appear as removable devices.
  • The Safely Remove Hardware option for the virtual hardware appears in the Windows System Tray.
  • When using VMware View, you notice that View desktops that have persistent disks are disconnecting.

Purpose

This article provides information on disabling the HotPlug capability on removable devices.

Resolution

You can disable HotPlug capability using the vSphere Client or by editing the .vmx file.

Note: You can disable HotPlug capability for PCI devices such as e1000 or vmxnet2 NICs.

To disable HotPlug capability using the vSphere Client:

  1. Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.
  2. Power off the virtual machine.
  3. Right-click the virtual machine and click Edit Settings.
  4. Click the Options tab.
  5. Click General > Configuration Parameters > Add Row.
  6. Insert a new row with the name devices.hotplug and a value of false.
  7. Power on the virtual machine.

To disable HotPlug capability using the vSphere Web Client:

  1. From a web browser, connect to the vSphere Web Client.
  2. Log in with Administrator credentials.
  3. Navigate to the virtual machine you want to modify.
  4. Right-click the virtual machine and select Edit Settings.
  5. Click the VM Options tab.
  6. Click Advanced > Edit Configuration > Add Row.
  7. Insert a new row with the name devices.hotplug and a value of false.
  8. Power on the virtual machine.

To disable HotPlug capability by editing the .vmx file:

  1. Power off the virtual machine.
  2. Access the ESXi/ESX service console using an SSH client.
  3. Open the virtual machine configuration file (.vmx) in a text editor. The default location is:

    /vmfs/volumes/datastore_name/vm_name/vm_name.vmx

  4. Add the line:

    devices.hotplug = "false"

    Note: This setting does not interfere with HotPlug CPU/memory.

  5. Save and close the file.
  6. Power on the virtual machine.

Note: If you are using VMware View, follow one of the above procedures for the parent virtual machine first, then follow these steps:

  1. Create a new snapshot of the parent virtual machine:
    1. In the vSphere Client, right-click the parent virtual machine and click Snapshot > Take Snapshot.
    2. Give the snapshot a name and description.
    3. Click OK.
  2. Recompose the affected pools to this new snapshot:
    1. In the View Manager console, select a pool and open it.
    2. Click View Composer > Recompose, and select the newly created snapshot.
    3. Click Next.
    4. Configure the Schedule and Warnings options.
    5. Click Next.
    6. Review the confirmation information.
    7. Click Finish and verify that the recompose operation successfully completes.
    8. Repeat the recompose procedure for all affected pools.

 

VMware KB: Disabling the HotAdd/HotPlug capability in ESXi 5.x and ESXi/ESX 4.x virtual machines.