Nov 4, 2008

Oracle ERP JVM

1. What is JVM ?
JVM acronym for Java Virtual Machine which executes instructions generated by Java compiler. So user click on any Self Service Request or any program which uses Java, then Apache forwards this request to mod_jserv (mod_oc4j in 10g AS) & mod_jserv caters this request with help of JVM.

2. How to increase No. Of JVM's
So lets start with CONTEXT file under $APPL_TOP/admin (xml file) which is of pattern $SID_$HOSTNAME.xml
There are two important lines in CONTEXT file which will help you in understanding JVM

# jvm_options oa_var="s_jvm_options" osd="Solaris" -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB /jvm_options

-Verbose:gc means JVM is configured to print output when gc(Garbage Collector) runs.
Xmx is maximum memory allocated to JVM in above example its 512 MB.
Xms is JVM will start with this much memory i.e. 128 MB.
# Now Check another line in 11i Context file like oacore_nprocs oa_var="s_oacore_nprocs"2/oacore_nprocs
Which means that there are two JVM's for OACore Group. Usually default its 1 JVM in my Instance I changed it to 2, to cater huge Self Service users in my case.
# In Context File
disco_nprocs oa_var="s_disco_nprocs" osd="Solaris" 1 /disco_nprocs Sets 1 JVM Process for Discoverer.
oacore_nprocs oa_var="s_oacore_nprocs" 1 /oacore_nprocs Sets 1 JVM for for OACoreGroup
Similarly , s_forms_servlet_nprocs & s_xmlsvcs_nprocs for Forms & XML Services resp.
These Groups are defined in configuration file for Jserv i.e. jserv.conf under $IAS_ORA/Apache/Jserv/conf ; like
ApJServGroup OACoreGroup
ApJServGroup DiscoGroup
ApJServGroup FormsGroup
ApJServGroup XmlSvcsGrp

3. Sizing Apps JVM
As by now you might be aware that there are four JVM Groups, OACoreGroup,DiscoGroup, FormsGroup & XMLsvcsGrp ( FromsGroup JVM's disabled by defualt as forms run on Socket rather servlets) so thumb rule in Apps is 1 JVM with default settings per 100 Users for OACoreGroup, so if you have 1000 users with five middle tiers you can configure 2 JVM on each middle tier i.e. 2*5*100=1000 Users.

- 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)

refer from http://www.teachmeoracle.com/jvm.html

0 意見: