11.7 tc Runtime: JVM Performing a Full GC

By default, tc Runtime instances have JMX turned on so that you can use Hyperic HQ to monitor and manage the instances. Specifically, tc Runtime instances enable JMX using the JmxSocketListener in the server.xml configuration file, as shown:

<Listener className="com.springsource.tcserver.serviceability.rmi.JmxSocketListener" 
          port="${jmx.port}"
          ...
/>

When JMX is enabled in this way, some JVMs (such as Sun's) that do distributed garbage collection will periodically invoke System.gc, causing a Full GC. This action can affect the performance of your deployed Web applications.

There are two ways to work around this issue:

Specify that the JVM invoke the System.gc() less often. For example, to configure the Sun JVM to invoke System.gc() at one-hour intervals, use the following JVM options:

-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000

Alternatively, disable explicit GC altogether. For example, to disable GC for the Sun JVM:

-XX:+DisableExplicitGC

In both cases, set these JVM options in the INSTANCE-DIR/bin/setenv.sh|bat file using the JVM_OPTS variable appropriate to your platform.