Quick Tip: Changing Java Heap Size for OIM

Quick Tip: Changing Java Heap Size for OIM

A common tuning step you’ll see to help your OIM performance is to increase the Java Heap size for the WebLogic servers. The problem is, it’s hard to find a consensus among the varying Oracle documentations. Hopefully this blog post clears up some of the confusion.



IDMWORKs recommends the following steps for changing the Java Heap size:

1.  Discover the $DOMAIN_HOME/bin directory

2.  Edit the file called “setDomainEnv.sh” (setDomainEnv.cmd on Windows)

3.  Find the line which checks the USER_MEM_ARGS variable (somewhere around line 350 (259 on Windows))


# IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values

if [ “”${USER_MEM_ARGS}”” != “””” ] ;then
export MEM_ARGS

4.   Now simply add a line before this block of code which sets USER_MEM_ARGS:

USER_MEM_ARGS=””-Xms2048m -Xmx2048m -XX:MaxPermSize=512m”” export USER_MEM_ARGS

set USER_MEM_ARGS=-Xms2048m -Xmx2048m -XX:MaxPermSize=512m

It’s as simple as that.

Now save the file and then restart all of your WebLogic servers.



During start-up, you should see the Java Memory Arguments in the output to verify the settings are correct.

  • 2048MB (2GB) is recommended and it is the value we usually use



Questions, comments or concerns? Feel free to reach out to us below or at IDMWORKS