OC4J - Memory Allocation


How to allocate enough Java Memory in Oracle Containers for Java OC4J to run for instance Oracle BI Publisher.


To allocate additional memory for OC4J:

  • Stop OC4J, using the Stop OC4J command :
OracleBI_HOME/oc4j_bi/bin/oc4j -stop
  • Navigate to OracleBI_HOME/oc4j_bi/bin.
  • Edit the oc4j.cmd file to start OC4J with more memory.

Allocate a minimum of 256 MB of memory by increasing the permanent generation memory to 128m in addition to the regular heap size.

  • Find the following line:
  set JVMARGS=-Djava.library.path=D:\OracleBI\server\Bin;D:\OracleBI\web\bin -DSAROOTDIR=D:\OracleBI 
  • In this line, between the variables -DSADATADIR=D:\OracleBIData and %OC4J_JVM_ARGS%, add the following text:
  -XX:MaxPermSize=128m -Xmx512m
  • Save oc4j.cmd.

Possible other configurations

-XX:MaxPermSize=128m -Xmx512m  
-XX:MaxPermSize=256m -Xmx1024m 
-XX:MaxPermSize=512m -Xmx2048m 

Powered by ComboStrap