Java Garbage Collection and FirstSpirit >= 5.2R18

Crownpeak Employee
Crownpeak Employee
0 0 223

FirstSpirit 5.2R18 introduced additional parameters for the Java Garbage Collection (GC). The new parameters add additional information to log files, providing valuable information to you and us when analyzing potential issues with the Garbage Collector of Java in combination with operating FirstSpirit.

These parameters are automatically added to configurations in new installations of FirstSpirit 5.2R18 or above. For existing installations the parameters need to be added manually to the fs-wrapper.conf to leverage their effect.

If you are operating an existing FirstSpirit installation, please add the following lines to your fs-wrapper.conf as parameters if they are not yet defined.

-XX:+PrintTenuringDistribution (Logs tenuring statistics / how old objects are)

-XX:+PrintReferenceGC (Logs processing times during stop the world pauses)

-XX:+PrintGCDetails (Logs more elaborate GC info)

-XX:+PrintGCDateStamps (Logs timestamps of GC events)

-XX:+PrintGCTimeStamps (Logs timestamps for each GC event)

-XX:+PrintGCApplicationStoppedTime (Logs real stop the world time)

While adding these parameters please also check if your Garbage Collection parameters are correct for your specific version of Java as described below. If not, please change your configuration accordingly taking into account that you may already have custom Garbage Collection settings in place, tailored to your environment. Make sure that you do not change important settings for your environment.

Java 7

Java 7 is using the following parameters to define the size of Permanent Generation space that will be allocated during startup of the JVM. The exact size (500M in the example below) is the standard setting and can be adjusted to your specific needs.



Java 8

The parameter to define the Permanent Generation space is not available in Java 8 anymore as Permanent Generation was removed with Java 8 and succeeded by Metaspace. If you are operating FirstSpirit with Java 8 it is safe to remove the PermSize and MaxPermSize parameters mentioned above and replace them as follows with 500M being a standard setting again.



Java 9

We are currently, at the time of writing, providing Java 9 support in an early access program (EAP). Please see our dedicated post for further information. When using Java 9 you need to change several other aspects to the configuration as well. The exact changes are described in chapter 10.2 Using Java 9 (EAP) of the release notes of FirstSpirit 5.2R18.