Saturday, March 17, 2012

Guidelines to setup the JVM in Apps Ebusiness Suite 11i and R12

The purpose of this document is to provide guidelines for setting up JVMs (Jserv groups/OC4J instances) for online applications in Apps 11i and R12.

This is supposed to be a generic rule of thumb or a starting point. This document is written based on Sun's JDK. Other platforms, like Linux and HP, can also use pretty much the same parameter. AIX  does not have all those parameters and some differences will be pointed. Although there are differences in the JDK parameters, the concepts presented here should apply to all platforms.


Although this has shown to be sufficient for most of the Apps 11i and R12 installations, some additional tuning may be necessary.
Scope and Application
Oracle Application 11i (11.5.9 and up) and R12
Guidelines to setup the JVM in Apps Ebusiness Suite 11i and R12
JDK Version:
It is recommended to use JDK 1.6, because of better performance and additional features. On Solaris and Linux, Sun's JVM will automatically detect whether the Hotspot Server Compiler or the Client Compiler should be used based on the number of CPUs and memory available on the machine.
It is recommended also to use always the latest version for the specific JDK release.
For information about upgrading the JDK, refer to:
Note 401561.1 Using J2SE Version 6.0 with Oracle E-Business Suite 11i
Note 455492.1 Using Latest Update of Java 6.0 with Oracle E-Business Suite Release 12.
Note 418664.1 Overview of Using Java with Oracle E-Business Suite Release 12
Number of JVMs:
1) For OACoreGroup:
Assumption: eBusiness Suite  is running in a 2-tier environment (middle tier in a separate machine)
- No more than 100 active users per JVM/OC4J instance

- There should be no more than 1 active JVM/OC4J instance per CPU  (ideally, there should be 1 JVM per 2 CPUs)


- Watch out for available memory (make sure that you have enough memory to run all the configured JVMs/OC4J instances without swapping)
Note: Each 'core' in a multi-core system is considered to be a separate CPU. For example, a dual quad-core chip would be the same as stating 2 x 4 x CPU  or 8 CPUs.

In regards to hyper-threading cores, in theory the same thing applies, but in some cases it didn't equate to the exact same as a separate core. One could tune greater then a single CPU, but not treating the same as two CPUs.


2) For 
FormsGroup:
For the forms servlet, the actual JVM/servlet usage is minimal, and a single JVM can normally handle up to 100-250 forms users.
Note: that depends on the type of forms. For more complex forms, those numbers are likely to be substantially lower
Notes:
a) The number of jvms (oc4j in R12) is configured by the autoconfig variables s_oacore_nprocs, s_disco_nprocs, s_forms_servlet_nprocs and s_xmlsvcs_nprocs.


b) In 11i, those changes are made in the $IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.conf file, while in R12 in the $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
Heap Configuration:
1) For OACore, start with the following configuration:
For R12.0 and 11i:
       -Xmx512M -Xms256M -XX:MaxPermSize=128M
       -XX:NewRatio=2 -XX:+PrintGCTimeStamps
For R12.1 and higher:
      -Xmx1024M -Xms512M -XX:MaxPermSize=256M
      -XX:NewRatio=2 -XX:+PrintGCTimeStamps


     Also, ensure you add the following parameter to the DBC file:


     JDBC\:oracle.jdbc.maxCachedBufferSize=262144
    
Adjust the heap sizes accordingly to minimize garbage collection frequency and user pause times due to full garbage collections.
In JDK 1.6, the JVM detects that you have a server class machine (2 or more CPUs with 2GB or more memory), and will automatically enable Parallel Throughput Garbage Collector. The number of GC threads defaults to the number of CPUs on the machine. If you are running multiple JVMs on the same machine, or if your machine has more than 2 CPUs, to avoid the GC threads to be overly active you should reduce the number of GC threads by using:

      -XX:+UseParallelGC -XX:ParallelGCThreads=2


In most cases, using 2 GC threads should be sufficient. If you are using heap size of over 1GB, you can experiment with 4 GC threads and see if it gives you better performance. 


2) If using Forms in Servlet mode, the following configuration for FormsGroup should be enough for most of the cases:
      -Xmx256M -Xms128M -XX:MaxPermSize=128M -XX:NewRatio=2
Notes:
a) The heap is configured by the following autoconfig variables:

11i: s_jvm_options, s_forms_jvm_options

R12: s_oacore_jvm_start_option, s_forms_jvm_start_options,


b) In 11i, those changes are made in the $IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties file, while in R12 in the $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
Additional Recommendations:

1) It is recommended to use Forms in socket mode which is more efficient than servlet mode, unless there is a requirement to use servlet (like, need for external users access).


2) Although the setup of those parameters can be temporarily done manually changing (jserv.conf and jserv.properties in 11i; opmn.xml in R12), the correct way to update those parameters is using the context editor, update the variables s_oacore_nprocs and s_forms_servlet_nprocs, and then run autoconfig.


3) Oracle Development recommends to be on the last ATG rollup patch, which is currently ATG-rollup7 (
Note.783600.1).

5) Make sure to have the following setting in the jserv.properties file:

wrapper.bin.parameters=-DLONG_RUNNING_JVM=true


If there is any entry in jserv.properties setting -DCACHEMODE, either comment it out or remove that entry:

#wrapper.bin.parameters=-DCACHEMODE=LOCAL


6) Check also recommended patches for Performance issues in:

Note 244040.1  - Oracle E-Business Suite Recommended Performance Patches
7) AIX accepts only the parameters "-Xmx" -Xms". The reminder of the parameters should not be used on those platforms. More
More info about JDK parameters on AIX can be found at

http://www.ibm.com/developerworks/ibm/library/i-garbage3.html


8) A very good comparison of jdk parameters can be find at

http://blogs.sun.com/watt/resource/jvm-options-list.html

No comments:

Post a Comment