Selecting the appropriate garbage collector depends on the size of the heap and available CPU resources. The following is a table of available collectors and some general guidance on when and how to use them.

Specify the garbage collector using the jvm-memory.options file located in <PA_HOME>/conf. Modify the parameter beneath #Use the parallel garbage collector using the information provided below.

Garbage Collector Description Modifications
  • Best used with heaps 4GB or less
  • Full stop-the-world copying and compacting collector
  • Uses all available CPUs, by default, for garbage collection
Default collector for server Java virtual machine (JVM). No modification is required.
Concurrent Mark Sweep (CMS)
  • Best for heaps larger than 4GB with at least 8 CPU cores
  • Mostly a concurrent collector
  • Some stop-the-world phases
  • Non-Compacting
  • Can experience expensive, single threaded, full collections due to heap fragmentation
Set to ‑XX:+UseConcMarkSweepGC in jvm-memory.options.
Garbage First (G1)
  • Best for heaps larger than 6GB with at least 8 CPU cores
  • Combination concurrent and parallel collector with small stop-the-world phases
  • Long-term replacement for CMS collector, does not suffer heap fragmentation like CMS
Set to ‑XX:+UseG1GC in jvm-memory.options. Also disable #Minimum size for the Young Gen space and #Maximum size for the Young Gen space tuning. Explicit sizing adversely affects pause time goal. To disable, comment the lines out in the script.