Resolution: To enable garbage collection ("GC"), append the following JVM properties in
java.extended.properties in node tra.
"-verbose:gc -Xloggc:MyGCLog.txt -XX\:+PrintGCDetails -XX:+PrintGCTimeStamps and -XX:+PrintGCDateStamps"
The -verbose:gc option enables logging of garbage collection (GC) information.
-XX:+PrintGCDetails activate the “detailed” GC logging mode which differs depending on the GC algorithm used.
-XX:+PrintGCTimeStamp add time and date information reflecting the real time passed in seconds since JVM start is added to every line.
-XX:+PrintGCDateStamps each line starts with the absolute date and time when it was written:
-Xloggc:<<file name>> By default the GC log is written to stdout. With -Xloggc:<file> user can specify an output file.
Restart the node. Once started, you will find a file with the specified file name (in the above example MyGCLog.txt) in the directory <TIBCO_CONFIG_HOME>\tibcohost\<TH_INSTANCE_FOLDER>\data_3.2.x\nodes\<<Node_Name>>\bin .
Interpreting the file entry.
You can see two kinds of entries in the log file for Minor and Full Garbage Collection.
1).
2015-01-19T15:19:01.661+1100: 0.995: [GC
[PSYoungGen: 32768K->4475K(38208K)] 32768K->4475K(125632K), 0.0037490 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
The above line indicates a young generation GC which reduces the memory from 32768K to 4475K and time taken is 0.0037490 seconds. This will also show young generation collection details. In the above example during young generation collection, young generation memory is reduced from 32768K to 4475K. It also shows the young generation space capacity is 38208K.
2).
2015-01-20T16:56:09.228+1100: 92224.951: [Full GC
[PSYoungGen: 336K->0K(202496K)]
[PSOldGen: 66022K->60888K(87424K)] 66358K->60888K(289920K)
[PSPermGen: 78424K->78424K(157056K)], 0.2661716 secs] [Times: user=0.26 sys=0.00, real=0.27 secs]
The first entry indicates it is a Full GC. It shows young generation (PSYoungGen) memory recovery in addition to that Old Generation memory collection and PermGen memory collection. The above example shows Old Generation collection reduce the Old Generation memory from 66022K to 60888K and total heap memory recovery is from 66358K to 60888K. Another point to note is the total memory capacity and usage is the total of Old Generation capacity/usage and Young Generation capacity/usage.