HOW TO CHANGE JAVA HEAP SETTINGS IN SOA/OSB 12.2.1.4.0
In 12.2.1.4.0, oracle came up with reference configuration. What it means is that by default soa/osb comes up with some tuning parameters e.g., JTA timeout values, datasource connections, Java heap settings Xms and Xmx.
The default Xms and Xmx values are 4 GB for Admin server and 8 GB for managed server. These values are specified in $FMW_HOME/Oracle_Home/soa/common/bin/setSOARefConfigEnv.sh. These values may not be suitable for your workload. You can set desired heap values by modifying this file. But this is not best practice for the following reasons:
- When product is upgraded these values will be lost and need to redo again.
- If there are multiple clusters in you domain, say soa and bam, same setting applies to both clusters. It may not be desired.
It is better to place custom heap settings by creating file called setUserOverrides.sh in $DOMAIN_HOME/bin. Bonus advantage is values present in this file are honored during domain upgrades too.
Sample setUserOverrides.sh file for reference:
JAVA_OPTIONS="${JAVA_OPTIONS} -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:${DOMAIN_HOME}/servers/${SERVER_NAME}/logs/gc_${SERVER_NAME}_$(date +%Y%m%d_%H_%M_%S).log"
export JAVA_OPTIONS
JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
export JAVA_OPTIONS
if [ "${SERVER_NAME}" = "AdminServer" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=9001"
elif [ "${SERVER NAME}" = "bam_Serverl" ] ; then
JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=9002"
fi
export JAVA_OPTIONS
if [ "${SERVER_NAME}" = "AdminServer" ] ; then
USER_MEM_ARGS="-Xms2048m -Xmx2048m"
export USER_MEM_ARGS
fi
if [ "${SERVER_NAME}" = "bam_Serverl" ] ; then
USER_MEM_ARGS="-Xms3072m -Xmx3072m"
export USER_MEM_ARGS
fi
Comments
Post a Comment