Wednesday, December 9, 2015

Performance tunning oracle application server iAS oc4j container iAS

Performance tunning  oracle application server iAS oc4j container iAS


You can improve performance by setting the minimum heap size equal to the maximum heap size. To do this set the option -Xms size to be the same as the -Xmx size. This measure will ensure that the container picks up all the heap size during initialization and dows not have to optimize during the run, which can cause performance degrade.

Apply the JVM options: -verbose:gc -XX:+PrintGCDetails this will give us more insight into GC behaviour, (there will be excess logging).

The -XX:+AggressiveHeap option tunes internal VM parameters to be optimal for long-running, memory-intensive workloads. This option should  follow, on the command line, the heap sizing options -Xms and -Xmx.

After the above steps, set the -XX:+DisableExplicitGC to avoid explicit GC and observe the gc behaviour.


To obtain better performance in your application, by lowering the overhead of creating and recreating database connections, specify the connection pool min-connections attribute to set the minimum number of connections that the connection pool maintains. Find out how many max connections has DB allowed to connect to middleware on a busy day (V$ session and its status - active).
Set the "minimum number of connections" to value of 4th step as a test measure. (setting this value can also have a disadvantage- in case you would like to start mw with the DB being down, you would not be able to as mw will look for minimum vale before it initializes).

To improve performance, you can set the inactivity-timeout to a value that allows the connection pool to avoid dropping and then reacquiring connections while your J2EE application is running. To improve performance, I recommend that you increase the inactivity-timeout to 120 seconds.
If you see that the number of database connections grows and then shrinks during an idle period, and grows again soon after that, you can increase the min-connections.
Continue with the maximum number of connections = -1


Let us increase the MaxClients directive in the httpd.conf file up to a value of 1000 (default is 150). If your system is not resource-saturated and you have a user population of more than 150 concurrent HTTP connections, you can improve your performance by increasing MaxClients to increase server concurrency. We can go all the way upto 8000 if needed.

If the user's load is all OC4J requests, that is, Oracle HTTP Server serves up little or no content and serves just as a front end for OC4J, then it is a good idea to set Oc4jCacheSize equal to ThreadsPerChild. This setting provides a dedicated connection per thread, if needed, and should give the best performance. Else leave it as default which is 1.

Enable statement caching to lower the overhead of repeated cursor creation and repeated statement parsing and creation by setting the num-cached-statements attribute to a value greater than 0. The number you set for num-cached-statements should be the number of SQL statements that you use in your application. (Get this data from application team).


You need to assure that application and server logging levels are set appropriately, and that debugging properties or other application level debugging flags are set to appropriate levels or disabled. Set Oracle Application Server OC4J logger log levels to log messages at the INFO level (do not set log levels to levels that produce more diagnostic message, including the FINE or TRACE levels).


We can get into threadpool tunning if you have hardware restrictions, else there is no need. this is in case of frequent cpu spike or your users have reported poor response time from application.

If you face hung thread issues and you are on jdk 5.0, under some circumstances under heavy load, synchronization in an application can result in thread starvation. please check if you face hung threads often.


You may add the below as –D option in the startup parameters of opmn.xml file of the respective managed server on which JMS queue are created, the debug logs will help you with jms related debugging.