Heap Size
The JVM heap is a repository of active objects, inactive objects, and free memory. When an object can no longer be reached from any pointer in the running program, it is considered garbage and ready for collection. When the JVM heap runs out of memory, all processing in the JVM stops until garbage collection completes.
The JVM heap size is important because it controls how often, and for how long garbage collection runs. If garbage collection runs too infrequently, the extra time that is required to complete garbage collection can negatively affect the TIBCO MDM performance.
These are the recommended JVM settings for TIBCO MDM:
- Java heap (-Xms4096m -Xmx4096m). To avoid out of memory errors use identical settings for minimum and maximum memory. A good practice is to set the 512 MB heap per configured worker thread. For example, if there are eight worker threads, setting a heap of 4 GB is sufficient. The setting also depends on the bundle sizes.
- Performance options:
XX:NewSize=256m. Default size of new generation (in bytes) XX:MaxPermSize=512m. Size of the Permanent Generation
- Behavioral options:
XX:-UseParallelGC. Use parallel garbage collection for scavenges.
- Debugging options:
XX:+HeapDumpOnOutOfMemoryError. Dump heap to file when java.lang.OutOfMemoryError is thrown
Use the debugging options only if you suspect a memory leak and you need to take the heap dump out of memory. This is not recommended in a production environment.
For GC -XX:-ParallelGC is recommended to select the parallel garbage collector for the new generation of the Java heap. For more information, refer to http://www.oracle.com/technetwork/java/tuning-139912.html.
The JVM heap size is a configurable parameter that you can set when you start the TIBCO MDM instance. You may also want to review the G1 garbage Collector introduced in JDK 1.7.0. For more information, refer to http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/G1GettingStarted/index.html.