How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I change the JVM heap size for IDM?

Last updated Jan 12, 2023

The purpose of this article is to provide information on changing the JVM heap size for IDM.

Changing the JVM heap size

Changing the JVM heap size can improve performance and reduce the time it takes to run reconciliations. You should try different heap sizes to see what impact it has to determine the best heap size for your setup.

You can set the JVM heap size via the OPENIDM_OPTS environment variable. If OPENIDM_OPTS is undefined, the JVM maximum heap size defaults to 1GB. For example, to set the minimum and maximum heap sizes to 2GB, you would enter the following prior to starting IDM:

On Unix® and Linux® systems:

$ cd /path/to/idm/ $ export OPENIDM_OPTS="-Xms2048m -Xmx2048m" $ ./

On Microsoft® Windows® systems:

C:\> cd \path\to\idm C:\path\to\idm> set OPENIDM_OPTS=-Xms2048m -Xmx2048m C:\path\to\idm> startup.bat

You can also edit the or startup.bat files to update the default OPENIDM_OPTS values.


It is recommended that you set the minimum and maximum heap sizes to the same value for best performance. Otherwise, the JVM runs a full Garbage Collector (GC) cycle when increasing its heap, during which time it can pause ongoing operations for up to a few seconds. Generally, a smaller heap will increase the frequency at which the JVM GC executes but reduce the duration; similarly, a larger heap will reduce the frequency and increase the duration. When tuning the JVM heap, the goal is to strike a balance between frequency and duration so as to reduce the impact of the GC on the application.

See Also

Best practice for JVM Tuning with G1 GC

Best practice for JVM Tuning with CMS GC

How do I enable Garbage Collector (GC) Logging for IDM?

Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.