Customizing the WebLogic JVM heap size

You can change the default JVM heap size to fit the needs of your deployment.

The default JVM heap size for WebLogic is 3GB. The size is set in the setDomainEnv.sh file for Linux or setDomainEnv.cmd for Windows, which is in the $DOMAIN_HOME/bin directory. The heap size is set with the -Xmx option.

To change the WebLogic JVM heap size:

  1. Open the setDomainEnv file in a text editor.
  2. Search for this comment line:
    For Linux:
    # IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
    For Windows:
    @REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
  3. Immediately after the comment line, add one of these lines:
    For Linux:
    export USER_MEM_ARGS="-Xms128m -Xmx3072m ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"
    For Windows:
    set USER_MEM_ARGS=-Xms128m -Xmx3072m %MEM_DEV_ARGS% %MEM_MAX_PERM_SIZE%
  4. Save the file.
  5. Re-start WebLogic Server.