This discussion is archived
1 Reply Latest reply: Dec 18, 2012 9:25 AM by 980583 RSS

Help needed in GarbageCollection,not running as expectd CMSInitiatingOccupa

956122 Newbie
Currently Being Moderated
We are using weblogic 9.22 and Java 5 with below server parameters

SERVER_JAVA_OPTIONS="-Dweblogic.Debug=weblogic.JTAJDBC,weblogic.JTA2PC,weblogic.JTAXA,weblogicJTAResourceHealth -Dweblogic.Debug=weblogic.ejb20.cmp.rdbms.verbose,weblogic.ejb20.cml.rdbms.debug -Ddebug.methodNames=true -Ddebug.lineNumber=true"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dweblogic.webservice.client.ssl.trustedcertfile=${SERVER_WEBLOGIC_HOME}/server/lib/trusted.crt"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Djava.protocol.handler.pkgs=weblogic.webservice.client"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dweblogic.webservice.client.ssl.strictcertchecking=false"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dweblogic.security.SSL.enforceConstraints=false"
#SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Djavax.net.ssl.trustStore=/apps/opt/weblogic/config/cabpool/some_keystore"
#SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dssl.debug=true"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dweblogic.webservice.verbose=false"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:+UseConcMarkSweepGC"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:+UseParNewGC"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:+CMSParallelRemarkEnabled"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:CMSInitiatingOccupancyFraction=60"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:+UseCMSInitiatingOccupancyOnly"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:ParallelGCThreads=8"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:PermSize=512m"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:MaxPermSize=512m -d64 -Xss512k"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:NewSize=192m"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:MaxNewSize=192m"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:+PrintGCDetails"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -XX:+PrintGCTimeStamps"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dcom.sun.management.jmxremote.port=8885"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dcom.sun.management.jmxremote.ssl=false"
SERVER_JAVA_OPTIONS="${SERVER_JAVA_OPTIONS} -Dcom.sun.management.jmxremote.authenticate=false"

Heap Size is 4GB

According to CMSInitiatingOccupancyFraction=60 , GC should work when reaching 60% of the memory. But that's not happening instead memory consumption goes above 4GB then GC works and memory comes down to 500MB ,during this our GUI screen hangs for few seconds.

Could somebody please help me in this ?
  • 1. Re: Help needed in GarbageCollection,not running as expectd CMSInitiatingOccupa
    980583 Newbie
    Currently Being Moderated
    I'm not as familiar with tuning the hotspot VM as i would like to be so the following may well be things you have already tried. If i had an extract from the GC logs that would probably help me visualize what is happening under the covers.

    With CMSInitiatingOccupancyFraction=60, a Major GC will kick in when more than 60% of the tenured generation size is in use. Based on your description that appears to be the case here, if you set this to the default (92% iirc) does this help any with the pause or is it basically the same?

    You may want to take a look at http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html (the "Starting a Concurrent Collection Cycle" section).

    This could be one of those cases where the heap is just too big (probably not if you have 8 cores working through it) or it could be that you have in-flight threads that need to be brought to a safe point prior to processing and your CPU is pinned (what was CPU looking like before/during/after the GC cycle?) see:- http://mail.openjdk.java.net/pipermail/hotspot-gc-use/2011-August/000915.html

    It might be worth investigating the use of UseCMSInitiatingOccupancyOnly (consider not using it see if that helps) http://docs.oracle.com/cd/E19543-01/820-2962/Performance_Tuning.html#wp1265817

    Out of pure interest (for background) what is it you are doing in your GUI that is so memory intensive?

Legend

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