Fine-tuning JVM options - PingFederate - 11.1

PingFederate Server

PingFederate Server
PingFederate 11.1

Edit the JVM options jvm-memory.options file to customize minimum and maximum heap sizing, garbage collection, and generation specific sizing for your memory use and to optimize PingFederate's performance.

PingFederate reads java virtual machine (JVM) options from the jvm-memory.options file, located in the <pf_install>/pingfederate/bin directory. Any manual modifications or additions should be made in this file.
Before making any edits to the file, consider the following:
  • Make a backup copy prior to any manual edits.
  • The empty lines and comments, indicated by a leading # character, are ignored.
  • JVM options do not need a specific organization or order.
  1. Edit the <pf_install>/pingfederate/bin/jvm-memory.options file.
  2. To configure a specific heap size, edit the minimum -Xms and maximum -Xmx heap options.

    The valid unit qualifiers are k for kilobytes, m for megabytes, and g for gigabytes. In other words, -Xmx1536m and -Xmx1.5g are equivalent.

    For exmaple, to fix the JVM heap size to 2 GB, configure the minimum and maximum options as follows.

  3. To override the number of garbage collection threads used by the parallel collector, add the -XX:ParallelGCThreads=n option, where n is the desired number of garbage collector threads.

    For example, to configure the parallel collector to use four threads, add the following option to the configuration file.

  4. To enable the concurrent mark sweep (CMS) collector, remove the -XX:+UseParallelGC option, or the options pertaining to another garbage collector, and replace it with the -XX:+UseConcMarkSweepGC option.
  5. To enable the garbage first (G1) collector, remove the -XX:+UseParallelGC option, or the options pertaining to another garbage collector, and replace it with the ‑XX:+UseG1GC option.

    If you enable the G1 collector, remove any sizing options specific to the young generation. Skip to step 7.

  6. To configure young generation-specific sizing options, edit the minimum -XX:NewSize and maximum -XX:MaxNewSize options for the young generation space.

    For example, to fix the young generation bias to 1 GB, set the minimum and maximum options as follows.

  7. To remove young generation-specific sizing options completely, remove the aforementioned options or add a leading # character.
  8. To add additional JVM options, insert the applicable options to the file.

    For example, to enable the aggressive options flag, configure the file as follows.

    # Enable the aggressive options flag

    The comment is optional.

  9. When finished, save your changes.
  10. If PingFederate is configured to run as a service on a Windows server, follow these steps:
    1. Open command prompt and go to the <pf_install>/pingfederate/sbin/wrapper directory.
    2. Run generate-wrapper-jvm-options.bat.

      This helper utility reads the JVM options from the jvm-memory.options file and creates a resource file that the PingFederate Windows service requires to configure its JVM options.

    3. Close the command prompt.
  11. Restart PingFederate.
  12. For a clustered PingFederate environment, repeat these steps on each engine node as needed.