9.1 Increasing the Heap Size

If your application takes a longer time to respond, you may need to optimize the memory reserved for the heap. For example, when Identity Applications are deployed in a large environment with approximately a million permissions, it may take a few minutes (1-2) to load the permission index. If the delay is not because of the hardware used, you can use the following Java virtual machine options to tune the heap:

  • If you run out of heap memory (not due to a memory leak), increase -Xmx.

  • If you run out of native memory, you may need to decrease -Xmx.

  • To tune the size of the heap for the young generation for JVM, modify -Xmn. For more information, see the Oracle Java documentation.

The heap size value is determined by the amount of memory available in the computer. Initial heap size is 1/64th of the computer’s physical memory or reasonable minimum based on platform (whichever is larger) by default. The initial heap size can be overridden using -Xms. Maximum heap size is 1/4th of the computer’s physical memory or 1 GB (whichever is smaller) by default. The maximum heap size can be overridden using -Xmx.

If you installed Identity Applications on a computer with a minimum 4 GB memory, and you want to improve the performance of the system under heavy load, set Xmx to 2048m for both minimum and maximum heap size in the /opt/netiq/idm/apps/tomcat/bin/setenv.sh or C:\NetIQ\idm\apps\tomcat\bin\setenv.bat file. For example, -Xms2048m -Xmx2048m. For minimum memory requirements, see the Identity Manager 4.8 System Requirements page. For general guidance about how heap size is calculated, see the Oracle Java documentation.

The amount of heap memory allocated to the Java virtual machine can impact performance. For example, if the Xmx value is too low (is set lower than the amount of live data in the JVM), it will force frequent garbage collections in order to free up the space (RAM). You may experience excessive page file swapping if Xms or Xmx value is more than the physical memory of the computer.