Home » Java » Java Garbage Collection problem using Liferay on JBoss: GC executed many times-Exceptionshub

Java Garbage Collection problem using Liferay on JBoss: GC executed many times-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

We are experiencing garbage collection problems in an environment composed of Liferay 6.2 and JBoss 6.4.5.

The server is running smoothly and GC process seams normally well-executed, but at one point the GC process starts executing many times:

GC Duration time

We are running in a 16GB memory server with the following memory configuration:
Memory distribution

JAVA_OPTS=”$JAVA_OPTS -Xms6144m -Xmx6144m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=2048m”

No memory leaks are detected.

Could anyone help us explain why the GC behaviors like this?

Thank you very much in advance.

How to&Answers:

Looking at chart I assume you are using ParallelGC in HotSpot JVM.

ParallelGC is switching from generational (young/old) to single space operation mode if live data set does not fit old space size.

In single space every collection is Full GC.

Solution is to increase old space. It can be done either by increasing heap size or by reducing new size (e.g. -Xmn1g option).