How to address Garbage Collection related errors in the BusinessWorks' BWAgent or Appnode?
book
Article ID: KB0074976
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks
6.x
Description
GC problems happen because the JVM heap memory levels are not sufficient to handle the workload and they can be identified by the following symptoms:
a) Common errors in bwagent or appnode logs, which may indicate a problem with GC are "java.lang.OutOfMemoryError: GC overhead limit exceeded" and "java.lang.outofmemoryerror java heap space".
b) Capture the GC statistics, either by profiling the affected process(es) with JVisualVM:
Follow steps 1 to 6 in the below document to connect the bwagent or bwappnode to JVisualVM.
Performance Benchmarking and Tuning Document: Benchmarking and Testing Performance -> Monitoring and Analyzing TIBCO ActiveMatrix BusinessWorks™ Components -> JVisualVM > Monitoring Threads and Taking a Thread Dump Using JVisualVM
or by enabling GC logging:
Add below gc arguments to the java.extended.properties in the bwagent or bwappnode tra
After recreating the problem, analyze the MyGCLog.txt in a tool like www.gceasy.io.
c) One side effect of a BW 6.x process encountering too many GC cycles is an elevated level of CPU consumption and some periods of application slowness.
Issue/Introduction
Typically, when garbage collection (GC) errors happens, it can mean that a greater amount of time is spent in GC instead of BW application execution. What changes can be made to address GC related errors?
Environment
TIBCO ActiveMatrix BusinessWorks™ 6.x/ All
Resolution
1) Increase the max heap memory that is allocated for the bwagent or bwappnode. Increase the value of -Xmx in java.extended.properties of the respective tra
2). Enable memory saving mode for appnode (applies to BW 6.6.0 and higher). The steps can be found in following chapter of the documentation:
Performance Benchmarking and Tuning: Memory Saving Mode
3). Set the FlowLimit and PageThreshold to finite numbers rather than 0 (infinite). Make sure FlowLimit is double the value of PageThreshold.
4). Tune the GC algorithm so that there are fewer long term objects in memory. The trade-off is a slight increase in CPU usage, so it should only be considered when CPU levels are not a problem. Add the below GC algorithm arguments to the java.extended.properties property in the bwagent or bwappnode tra.