Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Break down of Configuration

  1. Memory configuration
    JAVA_OPTS="-server"
    JAVA_OPTS="$JAVA_OPTS -Xms1280m"
    JAVA_OPTS="$JAVA_OPTS -Xmx1280m"
    JAVA_OPTS="$JAVA_OPTS -XX:NewSize=640m"
    JAVA_OPTS="$JAVA_OPTS -XX:MaxNewSize=640m"
    JAVA_OPTS="$JAVA_OPTS -XX:SurvivorRatio=5"
    JAVA_OPTS="$JAVA_OPTS -XX:TargetSurvivorRatio=90"
    JAVA_OPTS="$JAVA_OPTS -XX:MaxTenuringThreshold=12"
    JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"
    JAVA_OPTS="$JAVA_OPTS -XX:+CMSIncrementalMode"
    JAVA_OPTS="$JAVA_OPTS -XX:+CMSIncrementalPacing"
    JAVA_OPTS="$JAVA_OPTS -XX:+CMSParallelRemarkEnabled"
    JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC"
    JAVA_OPTS="$JAVA_OPTS -XX:PermSize=64m"
    JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=64m"
    JAVA_OPTS="$JAVA_OPTS -XX:+UseTLAB"
  1. Enable class unloading (needed with ConcMarkSweepGC
    JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled"
    JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled"
  1. debug and memory tweaks to avoid Hotspot Compiler Failure
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintCompilation"
    JAVA_OPTS="$JAVA_OPTS -XX:CodeCacheMinimumFreeSpace=2M"
    JAVA_OPTS="$JAVA_OPTS -XX:ReservedCodeCacheSize=64M"
    JAVA_OPTS="$JAVA_OPTS -XX:CompileCommandFile=/my/portal/bin/hotspot_compiler"
  1. Enable JMX Remote Monitoring
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9000"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file=/my/portal/bin/jmxremote.password"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file=/my/portal/bin/jmxremote.access"
  1. turn on some debug for GC
    JAVA_OPTS="$JAVA_OPTS -verbose:gc"
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps"
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails"
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintTenuringDistribution"
    JAVA_OPTS="$JAVA_OPTS -Xloggc:/my/portal/logs/portal/gc.log"
  1. Enable remote debugging port
    JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"