Jump to: navigation, search

Performance Tuning with Java Virtual Machine

Use the following parameter settings in Java Virtual Machine (JVM) Garbage Collection (GC) to maximize the performance of GRE and GRAT.

Important
For performance reasons, GRAT and GRE should run under separate JVMs.

Required

-server -Xms2G -Xmx2G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=5 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=10 

Highly Recommended For GC log

These settings help in debugging JVM performance problems.

Important
Adjust the value for parameter -Xlogg parameter as needed—this is the log file path.
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -Xloggc:[path to gc log file]

Highly Recommended for Out Of Memory Heap Dump

Important
Adjust the value for parameter -XX:HeapDumpPath parameter as needed.
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=[path to heap dump file]

Notes

  • For most cases 2G for -Xms (heap space min) and -Xmx (heap space max), as in the above required settings, will suffice. In some marginal cases, you may need to increase or decrease the heap space.
  • If GRE has a lot of rules deployed, then the Xms/Xmx values must be increased to leave enough heap space to execute the requests at the required rate.

Examples

  • If rule packages alone consume about 3G of heap when loaded in memory, you should use approximately 6G as the value for Xms and Xmx.
  • If there are only few rule packages (each with only few rules) then 1GB of heap space should be enough.
Important
GRE's Memory Monitor statistics log output can be used to determine the amount of heap space needed by GRE. Before enabling the Memory Monitor in production environment, please make sure to read about its purpose and adjust the settings according to the heap space.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on April 28, 2017, at 03:03.