How do I get a Java garbage-collection log from StreamBase Server?

How do I get a Java garbage-collection log from StreamBase Server?

book

Article ID: KB0074101

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7

Description

How do I get a Java GC log from StreamBase Server?

Issue/Introduction

Configuration guidance

Resolution

Turn on Java Garbage Collection logging for the server by adding Java configuration settings to the server configuration.

For TIBCO Streaming version 10.x or later, add to the StreamBaseEngine *.conf HOCON configuration file, section:
    jvmArgs = [
      ...
      "-verbose:gc"
      "-XX:+PrintGCDetails"
      "-XX:+PrintGCDateStamps"
      "-XX:+PrintTenuringDistribution"
      "-Xloggc:gc.log"
    ]

The output file will be created in the node directory and will be included in any node snapshot archive created.

For TIBCO StreamBase version 7.x, add to the sbd.sbconf the settings:
<java-vm>
<param name="jvm-args" value="
  ...
  -verbose:gc
  -XX:+PrintGCDetails
  -XX:+PrintGCDateStamps
  -XX:+PrintTenuringDistribution
  -Xloggc:gc.log
"/>

The output will appear in the file gc.log in the server's current directory.

Garbage-collection is the activity in a Java VM where unused objects are disposed and their memory returned to the Heap to be allocated to new objects. In some instances, this activity can introduce processing pauses. The GC log will identify how frequently and how long these pauses occur. The default StreamBase Server memory settings are designed to run GC in parallel with the rest of the server so no pauses impact throughput and add latency, but for any specific set of applications additional tuning may be necessary.