DOYENSYS Knowledge Portal

We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal

Monday, October 3, 2016

Changing the heap size of the OMS in EM12c

The Java heap memory utilization for your Oracle Management Service (OMS) should be averaging at under 75%, and anything over this could mean the Garbage Collection starts impacting the performance of your Enterprise Manager experience.
If you’re using the “out-of-the-box” notification rules, then an OMS suffering such symptoms may start churning out events like this:
EM Event: Critical:/EMGC_GCDomain/GCDomain/EMGC_OMS1 – The heap usage is 91%.
In this particular example, I’m running a relatively small Enterprise Manager Cloud Control 12c configuration (less than 1,000 targets), but the 1GB heap size that’s been allocated isn’t quite enough any longer, and the heap usage for the primary OMS is over 90% quite frequently.  Oracle advise the OMS heap size be increased to 4GB as a minimum when your installation is considered a ‘medium’ configuration (amongst other settings), so I’ve decided to go for 2GB here.  Obviously you need to make sure you have sufficient physical memory on your server to cope with the increase 
First of all, backup the script, then increase the Java heap sizing to meet your requirements:
cd /u01/app/oracle/middleware/oms12c/gc_inst/user_projects/domains/GCDomain/bin
Look for the first USER_MEM_ARGS reference within the file and change from this:
if [ "${SERVER_NAME}" != "EMGC_ADMINSERVER" ] ; then
 USER_MEM_ARGS="-Xms256m -Xmx1024m -XX:MaxPermSize=612M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled"
 if [ "${JAVA_VENDOR}" = "Sun" ] ; then
 if [ "${PRODUCTION_MODE}" = "" ] ; then
 USER_MEM_ARGS="-Xms256m -Xmx1024m -XX:MaxPermSize=612M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:CompileThreshold=8000 -XX:PermSize=128m"
…to this (I’m changing the heap size of my OMS from 1GB to 2GB here):
if [ "${SERVER_NAME}" != "EMGC_ADMINSERVER" ] ; then
 USER_MEM_ARGS="-Xms1024m -Xmx2048m -XX:MaxPermSize=1024M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled"
 if [ "${JAVA_VENDOR}" = "Sun" ] ; then
 if [ "${PRODUCTION_MODE}" = "" ] ; then
 USER_MEM_ARGS="-Xms1024m -Xmx2048m -XX:MaxPermSize=1024M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:CompileThreshold=8000 -XX:PermSize=128m"
Once that’s done for each OMS, you just need to restart your OMS(es) to the changes to take effect:
export OMS_HOME= /u01/app/oracle/middleware/oms12c/oms
$OMS_HOME/bin/emctl stop oms
$OMS_HOME/bin/emctl start oms
Check that your OMS has started up with the correct memory settings:
grep "JAVA Memory arguments" /u01/app/oracle/middleware/oms12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out

JAVA Memory arguments: -Xms1024m -Xmx2048m -XX:MaxPermSize=1024M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:CompileThreshold=8000 -XX:PermSize=128m

1 comment:

Sridevi Koduru ( said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at | +91 - 9581017828.