R12-Increase Java Heap Size and JVM

Current Settings

[applmgr@uswodapq03 scripts]$ ./adoacorectl.sh status | grep “OC4J:oacore” | awk -F”|” ‘{print $3}’ | while read L ; do ps -fp $L | grep -v PID ; done | awk -F”-X” ‘{print $2 $3}’
mx512M ms128M

Shows we have 1 JVM with 512 as MX and 128 as MS.

Scope is to increase the JVM to 2 and Increase the Memory size.

Steps – Modify $Context_File

[applmgr@uswodapq03 ~]$ grep oacore_nprocs $CONTEXT_FILE
<oacore_nprocs oa_var=”s_oacore_nprocs”>1</oacore_nprocs>

[applmgr@uswodapq03 ~]$ grep s_oacore_jvm_start_options $CONTEXT_FILE
<oacore_jvm_start_options oa_var=”s_oacore_jvm_start_options”>-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/ebsqa/applmgr/inst/apps/ebsqa_uswodapq03/ora/10.1.3/j2ee/oacore/config/jazn.xml</oacore_jvm_start_options>

—–change the heap size as below and increase jvm to 2.
-Xmx1024M -Xms512M -XX:MaxPermSize=256M

[applmgr@uswodapq03 admin]$ grep s_oacore_jvm_start_options $CONTEXT_FILE
<oacore_jvm_start_options oa_var=”s_oacore_jvm_start_options”>-server -verbose:gc -Xmx1024M -Xms512M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/ebsqa/applmgr/inst/apps/ebsqa_uswodapq03/ora/10.1.3/j2ee/oacore/config/jazn.xml</oacore_jvm_start_options>

[applmgr@uswodapq03 admin]$ grep oacore_nprocs $CONTEXT_FILE
<oacore_nprocs oa_var=”s_oacore_nprocs”>2</oacore_nprocs>

Stop and Start Application Services


adopmnctl.sh stopall
adopmnctl.sh startall

After Changes- increased Heap memory with 2 JVM
[applmgr@uswodapq03 scripts]$ ./adoacorectl.sh status | grep “OC4J:oacore” | awk -F”|” ‘{print $3}’ | while read L ; do ps -fp $L | grep -v PID ; done | awk -F”-X” ‘{print $2 $3}’
mx1024M ms512M
mx1024M ms512M
Emergency fix – quick solution
Just in case you need to fix an issue quickly, you may want to edit $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml file directly and restart OPMN processes to enable new parameters.

<data id=”java-options” value=”-server -verbose:gc -Xmx1024M -Xms512M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+Use
TLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Dcom.sun.management.jmxremote -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt
.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/ebsqa/applmgr/inst/apps/ebsqa_uswodapq03/ora/10.1.3/j2ee/oacore/config/jazn.xml -Dhttp

<process-type id=”oacore” module-id=”OC4J” status=”enabled” working-dir=”$ORACLE_HOME/j2ee/home”>
<process-set id=”default_group” numprocs=”2″/>
Make sure to edit $CONTEXT_FILE to keep it in sync.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s