OBIEE Step by Step Guide

February 5, 2010

OC4J Parameters for BI Publisher Performance Improvement

Recently I heard so many folks talking about OC4J being a problem in production environments when deployed for BI Publisher. Complaints include OC4J shutting down itself when a batch script is used to run multiple jobs nightly. This brings into question whether OC4J is suitable for production environments along with BI Publisher?

While I trust Oracle being good at scalability issues and if you take a deep look inside OC4J how this runs, its mostly the parameters you pass to the underlying JVM from OC4J.

This made me wonder what the default parameters are with a OC4J installation.

Now, I need to find out the config locations of OC4J in my BI Publisher or OBIEE installation.

After a quick search, I came against this file called oc4j.cmd file in \\oracle_bi\oc4j_bi folder. Open this file and you will come across some of the default parameters used in starting the JVM behind OC4J server.

Lets look at the file

Lets look at the highlighted arguments that are passed to the JVM when instantiating the JVM.

By default, when OC4J is installed as part of OBIEE installation, JVM will try to use heap size of 128 MB permanent memory or it can use upto heap size of 512 MB while running an app. Lets get to know the parameters of JVM used here XX and Xmx.

Based on the blog mentioned above, XX helps in determining “Size of the Initial Permanent Generation” and how high it can go because we specified -XX:MaxPermSize=128m in our cmd file as shown above. On searching for -XX:MaxPermSize this leads to Size of max Permanent Heap Size” it can go to.

Are these parameter values good enough for a OC4J server ? Probably not.

Lets look at the other paramater -Xmx512m which means “set maximum Java heap size of JVM at 512 MB”. This is also probably not a good value for a production server.

Can the OC4J Server crash if BI Publisher tries to run multiple jobs nightly. Most probably 100% failure.

What does it take to fix this issue. As always, use the JVM monitoring tools to see how the heap size is being used over a trial period in QA by running all these jobs. Add additional parameters to the JVM like Xms, increase values for Xmx and size it accordingly.

How do we monitor the JVM usage ? Welcome to the world of Java’s JDK, JVM  and HostSpot Monitoring tools like Jconsole, Jstat.

I probably prefer Jconsole because of its wide spread usage and remote monitoring capabilities.  How do we monitor the Server remotely using Jconsole?

Follow this simple tutorial on and please remember to use the graphical version.

Log on to the remote server using the user name, password and port you want to monitor. Which port should we monitor? I would say do ps -ef | grep oc4j on the server to see that else try ps -ef | grep java to see the ports where the JVM is running. I dont have a linux box in hand to attach a screenshot. Thats my bad and your bad luck 😦

Always check the following graph to see how your memory consumption is going on Jconsole.

Also, check whether the garbage collection (gc) has been performed between the various jobs you run for BI Publisher reports or whether gc is run periodically. Better force the gc to run after each successful job of BI Publisher report.

I am sure you know how to force gc collection process as part of your batch jobs 🙂

For starters, use this link

Also, this is one more place to search for \\oraclebi\oc4j_bi\j2ee\home\config and look for server.xml file

Open this file and look for javac which is where we send in the parameters for java compiler inside JVM.


By default, we see the javac has Xmx parameter set at 1024 MB heap size in server.xml file as stated in the line above.

<java-compiler name=”javac” in-process=”false” options=”-J-Xmx1024m -encoding UTF8″ extdirs=”C:\Program Files\Java\jdk1.6.0_12\jre\lib\ext;C:\Windows\Sun\Java\lib\ext” />

 If we have more server RAM, try to increase this parameter. Also, you can add more parameters like Xms, Xx if you would like as stated above for JVM parameters.

Next comes to the logs where we can look for when BI Publisher crashes.. Remember that all the java related error log will be logged to javacache.log file. This is set in \\OracleBI\oc4j_bi\j2ee\home\config\javacache.xml file.

Also, the level parameter set inside javacache.xml file can be changed from “FATAL” to other values.

Still not satisfied and want more information on OC4J configuration?  No problem… Search for oc4juserguide.pdf file in your OBIEE installation \oraclebi\oc4j_bi\j2ee\home\default-web-app location.

Open this pdf file and go straight to page 43 of this 266 page document.

Look for “Setting OC4J runtime options at startup” and look for standalone configuration and runtime options.

This can take you one more level deep to configure your OC4J. Please post comments if you can add more to this article and we appreciate every reader’s colloboration to make this world free of IT consultants 🙂

Dont worry.. I am an IT consultant too 😦

Older Posts »

Create a free website or blog at