3 Replies Latest reply: Dec 17, 2013 7:51 AM by Brett Curtis RSS

Java heap size on OMS

DBA94080 Newbie
Currently Being Moderated

We are running OEM 12.1.0.3.0 on Linux x86-64.  Recently I have been getting critial OEM alert that Java heap size on OMS is at 98%.  I would like to know how to check my current/default heap size and how much heap size I should allocate?  We are a relatively small shop with ~40 OEM agents and ~300 monitoring targets.  Thanks.

  • 1. Re: Java heap size on OMS
    Rahul-EM Journeyer
    Currently Being Moderated

    Hi,

     

    The parameters for the java heap size are stored in the following file:

    <MW_HOME>/user_projects/domains/GCDomain/bin/startEMServer.sh

    USER_MEM_ARGS determine the Java heap size (USER_MEM_ARGS="-Xms256m -Xmx1740m)

     

    example (From startEMServer.sh)

    if [ "${SERVER_NAME}" != "EMGC_ADMINSERVER" ] ; then

      USER_MEM_ARGS="-Xms256m -Xmx1740m -XX:MaxPermSize=768M -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 -Xmx1740m -XX:MaxPermSize=768M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:CompileThreshold=8000 -XX:PermSize=128m"

        fi

      fi

      export USER_MEM_ARGS

     

    We can use the below simple emctl commands to get the property (after changing from the default):

    cd OMS_HOME/bin

    $ emctl get property -name "JAVA_EM_MEM_ARGS"

     

    To delete the property (revert to original setting):

    $ emctl delete property -name "JAVA_EM_MEM_ARGS"

     

    To change/increase the value

    emctl set property -name JAVA_EM_MEM_ARGS -value "<value>"

    example

    emctl set property -name JAVA_EM_MEM_ARGS -value "-Xms256m -Xmx2048m -XX:MaxPermSize=768M -XX:-DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=100M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled"

    Note:

    OMS restart using emctl stop oms -all

    emctl start oms is required on each OMS after changing the property value.

     

    Ref

    Oracle Enterprise Manager 12c Configuration Best Practices (Doc ID 1553342.1)

     

    Regards,

    Rahul

  • 2. Re: Java heap size on OMS
    Bip Explorer
    Currently Being Moderated

    Hi,

     

    You can also refer to below MOS notes,

     

    + OEM 12c: Troubleshooting OMS and UI Performance Issues (Doc ID 1460408.1) ----->Section: "2.5. Triaging OMS Memory Issues"

     

    + Enterprise Manager Performance: How to Investigate When OMS Re-starts / Fails to Start due to "Out of Memory" Condition? (Doc ID 794165.1)

     

    Regards,

    Biplab

  • 3. Re: Java heap size on OMS
    Brett Curtis Newbie
    Currently Being Moderated

    I would highly suggest you configure JVMD if you have not. We actually use the tool to dig into the OMS jvm and the JVMD Manager jvm itself to find performance issues. I would also look into better heap thresholds. In my opinion the heap % is useless. We set only : GC Invocation Time(ms) 2000 / 4000 and GC - Old Heap Percent Free after GC 10% / 5%

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points