Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

JVM options for Oracle Java HotSpot Virtual Machine

Updated on September 13, 2021

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.

  • -Xms 4096m
  • -Xmx 4096m

Permanent generation size: This memory is the location for all Java classes.

  • -XX:PermSize=512m
  • -XX:MaxPermSize=1024m​

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.

  • -XX:NewSize=1024m
  • -XX:MaxNewSize=1024m
  • -XX:TargetSurvivorRatio=90

Garbage collection: The Concurrent Mark Sweep (CMS) garbage collector is recommended for tenured generation. Tune garbage collection for specific applications as necessary.

  • -XX:+UseConcMarkSweepGC
  • -XX:+HeapDumpOnOutOfMemoryError

Just-in-time compiler (JIT):

  • Specify the codecache usage for the JIT compiler. If these settings disable JIT compilation, increase the ReservedCodeCacheSize value 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=512m
      To maintain performance over time, specify a ReservedCodeCacheSize value of at least 240m for Oracle Java 7. This value is the default setting for Oracle Java 8.
    • -XX:+UseCodeCacheFlushing
  • 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:
    • -verbose:gc
    • -XX:+PrintGCDetails
    • -Xloggc:gcout

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.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us