By default, TIBCO StreamBase® Runtime
doesn't modify the JVM heap
(-Xms<size>
and
-Xmx<size>
) or stack
(-Xss<size>
) memory options. If during testing,
the JVM is found to run short of, or out of memory, these options can be
modified either setting them as arguments to the deployment tool.
Both JConsole
and VisualVM
can be used for looking at heap memory utilization.
By default, TIBCO StreamBase® Runtime doesn't modify any of the JVM garbage collection parameters.
For production systems deploying using the Oracle JVM, we recommend that you enable garbage collection logging using the following deployment options:
-XX:+PrintGCDateStamps
-XX:+PrintGCDetails
-Xloggc:gc.log
Note: replace gc.log
with a name unique to
your deployed JVM to avoid multiple JVMs from colliding using the
same log file.
This will be provide a relatively low overhead logging that can be used to look for memory issues and using the timestamps may be correlated to other application logging (e.g. request/response latency).
Another useful set of Oracle JVM option controls GC log file rotation. See (Java HotSpot VM Options).
-XX:-UseGCLogFileRotation
-XX:-NumberOfGCLogFiles
-XX:GCLogFileSize
Garbage collection tuning is a complex subject with dependencies
upon the application, the target load, and the desired balance of
application throughput, latency, and footprint. Because there is no best
one-size-fits-all answer, most JVMs offer a variety of options for
modifying the behavior of the garbage collector. An Internet search will
show a large selection of writings on the subject. One book with good
coverage on the implementation and tuning of garbage collection in
Oracle JVMs is Java Performance by Charlie Hunt and Binu
John
.
When deploying using the Oracle JVM we recommend setting the following JVM deploy option which will cause a JVM heap dump to be logged upon an out of memory error within the JVM:
-XX:+HeapDumpOnOutOfMemoryError
Typically, an TIBCO StreamBase® Runtime deployment will consist of a single JVM per node. However, there may be cases where multiple JVMs per node are required (e.g. Exceeding a per-process limit on the number of file descriptors).
TIBCO StreamBase® Runtime supports multiple JVMs deployed within a single node. These JVMs may all access the same Managed objects.