JVM options for Oracle Java HotSpot Virtual Machine
When you configure a Java Virtual Machine (JVM) as the application server for Pega 7-based business solutions, how you tune the JVM depends on a variety of factors and changes over time. Consider these best practices when you specify the command-line JVM configuration options for Oracle Java HotSpot Virtual Machine.
Total heap size: The minimum and maximum values must be the same to ensure that maximum memory is allocated to Pega 7 at startup.
Permanent generation size: This memory is the location for all Java classes.
Nursery setting: This setting represents 25 percent of the total heap size, which was set by the -Xms and -Xmx options for native memory size, up to a maximum of 50 percent.
Garbage collection: The Concurrent Mark Sweep (CMS) garbage collector is recommended for tenured generation. Tune garbage collection for specific applications as necessary.
Just-in-time compiler (JIT):
- Specify the codecache usage for the JIT compiler. If these settings disable JIT compilation, increase the
ReservedCodeCacheSizevalue incrementally by 128m until the system stops generating an error message that the cache is full and the compiler is disabled. If JIT compilation is disabled, performance issues might occur.
-XX:ReservedCodeCacheSize=512mTo maintain performance over time, specify a
ReservedCodeCacheSizevalue of at least 240m for Oracle Java 7. This value is the default setting for Oracle Java 8.
- Enable the Abstract Window ToolKit (AWT) by specifying
-Djava.awt.headless=true. The AWT can render graphics, and Pega 7 uses those graphics in reports.
- Enable logging for garbage collection by specifying the following required settings:
You can use any name for the
gcout output file name.
- Block forced garbage collection by specifying
-XX:+DisableExplicitGC. When forced garbage collection is blocked, the JVM determines when and what type of garbage collection to initiate.