Tuning Java

This recipe shows how to increase the Java heap size so that Orchestrator performs better by making better use of the allocated memory resources.

Getting ready

First of all, we need more virtual memory allocated to the VM on which Orchestrator is running.

You also need SSH access to the appliance.

How to do it...

This how-to is for vCO 5.5 and higher, for versions 5.1 and lower please see kb.vmware.com/kb/2007423:

  1. Log in to the Linux operating system of your Orchestrator.
  2. Stop the Orchestrator service with service vco-server stop.
  3. Make a backup of the file with cp /usr/lib/vco/app-server/bin/setenv.sh /usr/lib/vco/app-server/bin/setenv.sh.bak.
  4. Type vi /usr/lib/vco/app-server/bin/setenv.sh.
  5. The vi command opens up and displays the contents of the file.
  6. Move the cursor to the line that starts with MEM_OPTS="-Xmx2048m.
  7. Press I and remove 2048. Enter your desired heap size in MB.
  8. Press Esc and then type :qw to exit and save. If you want to exit vi without saving, enter :q! instead.
  9. Start the Orchestrator service with service vco-server start.

How it works...

If you are increasing the virtual memory assigned to the VM, you will also need to increase the Java heap size, as it doesn't automatically adjust itself.

The Orchestrator service (vco-server) is a Java process that is set by default to a heap size set to 2 GB. Before going ahead and increasing the Java heap size, it's probably a good idea to check how many resources the Java process actually takes.

You need to balance the amount of memory that you give to the Orchestrator Java process with the rest of the memory usage of the system. This is especially important if you are running Orchestrator together with vRealize Automation. You can easily end up with programs competing for memory, which will slow the whole system down. Don't forget that the Linux system needs some memory too.

JVM metrics in Control Center

The new Control Center now contains a collection of Java metrics. To access them, click on Runtime Metrics and then on Generic. These metrics are also stored every five minutes in /var/log/vco/app-server/metrics.log.

In regards to the Java heap size, you can find a lot of answers here.

JVM metrics in Control Center

The most important metrics in regards to the Java Heap are:

JVM metric

Value in

Explanation

ConcurrentMarkSweep.count

Number

The number of times the Concurrent Mark-Sweep garbage collector has run.

ConcurrentMarkSweep.time

Number

The amount of time the Concurrent Mark-Sweep garbage collector has run.

heap.max

KB

The current amount of system memory allocated to the JVM.

heap.used

KB

The amount of allocated heap memory currently in use.

non-heap.*

KB

The current amount of system memory allocated to non-heap storage. This memory is used by Java to store loaded classes and other meta-data.

See also

The recipe Working with the vRA integrated Orchestrator in Chapter 13, Working with vRealize Automation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset