OpenText product name changes coming to the community soon! Learn more.

Wikis - Page

[NA support tip] How to configure the Java Virtual Machine for NA?

0 Likes

The recommended configuration of the Java virtual machine (JVM) heap and young generation sizes depend on the size of the NA core server.

The following table lists the recommended initial Java heap size depending on the NA core server size:

NA Core Server Size Initial Java Heap Size
Small NA Core Server at least 8 GB (8192)
Standard NA Core Server at least 16 GB (16384)
High Powered NA Core Server at least 50 GB (51200)

The recommended Java virtual machine (JVM) configuration is:

  • Initial Java heap size: from the table
  • Maximum Java heap size: the same value as the initial Java heap size
  • Young generation size: one-third of the initial Java heap size. The JVM configuration is specified in megabytes.

When modifying the JAVA additional parameters in the appserver_wrapper.conf, make sure you comply with the following:

  • The numbers in the JAVA additional properties must be sequential and unique. NA ignores the parameters if there is a gap in the sequence. If more than one parameter has the same number, then NA uses only one of the paramters.
  • A property must not have multiple values in comma-separated format. In this case, NA fails to start.

To set the JVM heap and young generation size, follow these steps:

  1. Change to the directory that contains the JVM configuration files:

    • Windows<HA_HOME>\server\ext\wrapper\conf
    • Linux<HA_HOME>/server/ext/wrapper/conf
  2. Back up the appserver_wrapper.conf file to a location outside the <NA_HOME> directory.
  3. In a text editor such as WordPad or vi, open the appserver_wrapper.conf file.
  4. Search for the string initmemory to locate the lines similar to the following lines:

    # Initial Java Heap Size (in MB) wrapper.java.initmemory=8192 # Maximum Java Heap Size (in MB) wrapper.java.maxmemory=8192

  5. Compare the values of the wrapper.java.initmemory and wrapper.java.maxmemory parameters to the minimums given for the initial and maximum Java heap size.

    • If the values meet or exceed the recommendations, no action is required and you can stop here.
    • If the values are lower than the recommendations, continue with step 6.
  6. If necessary, set the wrapper.java.initmemory and wrapper.java.maxmemory parameters to the minimums given for the initial and maximum Java heap size.
  7. Set the young generation size as follows:

    1. Determine whether the young generation size has been set previously by searching for the string -Xmn.

      • If this string is in the file, edit this line to set the recommended value for the young generation size as described earlier.

        For example:

        wrapper.java.additional.3=-Xmn2730m

      • If this string is not in the file, continue with step b.
    2. Search for the string Additional to locate the Java Additional Parameters section.
    3. After the last uncommented line in this section, add the following line:

      wrapper.java.additional.N=-XmnYGm

    4. In the newly added line, make the following substitutions:

      • Replace N with the next number in the sequence of uncommented wrapper.java.additional parameters.

        For example, if the wrapper.java.additional.11 parameter is uncommented and the wrapper.java.additional.12 parameter is commented out with a number sign (#), set N to 12.

      • Replace YG with the recommended value for the young generation size.

        For example:

        wrapper.java.additional.12=-Xmn2730m

  8. Set the metaspace sizing as follows:

    1. Add the following lines:

      • wrapper.java.additional.N=-XX:-UseCompressedClassPointers
      • wrapper.java.additional.N+1=-XX:-UseCompressedOops
      • wrapper.java.additional.N+2=-XX:MaxMetaspaceSize=3072m
      • wrapper.java.additional.N+3=-XX:MinMetaspaceFreeRatio=40
      • wrapper.java.additional.N+4=-XX:MaxMetaspaceFreeRatio=70
    2. Replace N with the next number in the sequence of uncommented wrapper.java.additional parameters.
  9. Restart all NA services.

For NA installed on a Linux operating system, you must edit the truecontrol file (/etc/init.d/truecontrol) to avoid any performance issues with JVM. To edit the file, follow these steps:

  1. In the truecontrol file, add the following lines after umask 077:

    MALLOC_CHECK_=0

    export MALLOC_CHECK_

  2. Save the file.
  3. Restart NA.

Labels:

Support Tips/Knowledge Docs
Comment List
Related
Recommended