Home > cloud control1 2c > Changing the heap size of the OMS in EM12c

Changing the heap size of the OMS in EM12c

      version 12.1.0.3

We had an issue where oracle management server ( OMS) was restarted on a daily basis  during the hourrs of 2 – 6 am , after numerous support updates with Oracle got no further forward , All they could suggest was increase the RAM of the machine as it was set to 8GB and they wanted me to increase it to 12GB

the error message being reported in the logs was

HealthMonitor 16-Oct-2013 03:38:18 OMS Heartbeat Recorder: error: Zero rows updated for this oms
during heartbeat
Critical error err=3 detected in module OMS Heartbeat Recorder:
OMS will be restarted.
A full thread dump will be generated in the log file

/u01/app/oracle/gc_inst1/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out

to help Oracle Support analyse the problem.

Please consult My Oracle Support Note 964469.1 for additional information.

The above error message could be related to a number of things but after speaking
with our system admin he did some investigation and notice that the JVM out of the box
was set to an initial size of 256 MB and a maximum size of 1750 MB which meant it
will have been constantly resizing itself and getting fragmented

So during garbage collection it would start impacting the performance of your Enetrprise manager

backup the startEMServer.sh script, then increase the Java heap size

cd /u01/app/oracle/middleware/oms12c/gc_inst1/user_projects/domains/GCDomain/bin
cp startEMServer.sh startEMServer.sh.bak
vi startEMServer.sh

Look for the first USER_MEM_ARGS reference within the file and change from

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 , we are fixing the size to 2560M

if [ "${SERVER_NAME}" != "EMGC_ADMINSERVER" ] ; then
USER_MEM_ARGS="-Xms2560m -Xmx2560m -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="-Xms2560m -Xmx2560m -XX:MaxPermSize=612M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing
-XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:CompileThreshold=8000 -XX:PermSize=128m"

restart your OMS to the changes to take effect:


export OMS_HOME= /u01/app/oracle/middleware12.1.0.3/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_inst1/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out

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

this vastly improved performance and stopped the daily restarts

Advertisements
Categories: cloud control1 2c
  1. Chris Broll
    October 20, 2013 at 8:03 pm

    Nice, its worth noting that you should only try this when you have plenty of resources but not much else you can do with apps that havent been designed to make good use of the JVMs Garbage Collections.

  1. No trackbacks yet.

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: