---
title: Fine-tuning JVM options
description: 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.
component: pingfederate
version: 13.1
page_id: pingfederate:performance_tuning_guide:pf_fine_tuning_jvm_option
canonical_url: https://docs.pingidentity.com/pingfederate/13.1/performance_tuning_guide/pf_fine_tuning_jvm_option.html
llms_txt: https://docs.pingidentity.com/pingfederate/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: November 30, 2022
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
  result: Result:
---

# Fine-tuning JVM options

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.

## About this task

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. For more information on JVM tuning options, see [HotSpot Virtual Machine Garbage Collection Tuning Guide](https://docs.oracle.com/en/java/javase/11/gctuning/index.html) in the Oracle documentation.

|   |                                                                                                                                                                                                                                                                                                                                                                           |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | 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.

- You can add any JVM flag to the file to configure and customize the JVM, not just memory-related options. |

## Steps

1. Edit the `<pf_install>/pingfederate/bin/jvm-memory.options` file.

2. To add additional JVM options, insert the applicable options to the file.

   ### Example:

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

   ```
   ...

   # Enable the aggressive options flag
   -XX:+AggressiveOpts
   ```

   The comment is optional.

3. When finished, save your changes.

4. 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`.

      ### Result:

   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.

   1. Close the command prompt.

5. Restart PingFederate.

6. For a clustered PingFederate environment, repeat these steps on each engine node as needed.
