Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can the Weblogic Server trigger the GC after the free heap space falls below a certain limit?

 
Sam Pablo
Greenhorn
Posts: 18
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am using WLS 10.3.2 and IBM AIX 6 as the OS and IBM jdk.

The application running on the server hanged after the gc did not happen even after the free heap space falls to 0%. This condition where the gc did not happen even if the free heap space dropped to 0% remained for another 40 min. I had to restart the box to start the application again.

I was manually able to trigger gc through the console's Garbage Collect button. As soon as I pressed the Garbage Collect button, the free heap % shoots up to 90.The jvm garbage collected and freed the heap space.

This did happen but is there any way that through the WLS server I can make the GC to happen after the free heap space falls below a certain limit?

After a little research I found an option for the setDomainEnv.sh:

-XX:MinHeapFreeRatio & -XX:MaxHeapFreeRatio. Can this tag help the WLS to trigger GC to happen at a particular free heap space ratio?

What are these option used for?

Any guidance or clue could be very helpful.
 
Sam Pablo
Greenhorn
Posts: 18
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the issue occurred again and the application deployed on the server stopped responding...... any help or clue what's happening?
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam Pablo wrote:IBM jdk ...

After a little research I found an option for the setDomainEnv.sh:

-XX:MinHeapFreeRatio & -XX:MaxHeapFreeRatio


These are Sun's JVM switches, for IBM JVM you should use -Xminf, -Xmaxf
 
Sam Pablo
Greenhorn
Posts: 18
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Misha Ver wrote:

These are Sun's JVM switches, for IBM JVM you should use -Xminf, -Xmaxf


Hey, thanks Misha . Have you used this tag? Is this to be included in the setDomainEnv.sh java options?

Thank you for the reply
 
Sam Pablo
Greenhorn
Posts: 18
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the parameters that are to be specified? Is it a ratio like 40 and 70 or something else? Please help.
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to this for the values of the parameters.

Parameter Values

Hope this helps.
 
Joseph Antoine Raja
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-XX:MaxHeapFreeRatio= -- Maximum percentage of heap free after GC to avoid shrinking.
-XX:MinHeapFreeRatio= -- Minimum percentage of heap free after GC to avoid expansion.

Please check this out

http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp


 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joseph Antoine Raja wrote:-XX:MaxHeapFreeRatio= -- Maximum percentage of heap free after GC to avoid shrinking.
-XX:MinHeapFreeRatio= -- Minimum percentage of heap free after GC to avoid expansion.

Please check this out

http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp




These are Sun's JVM switches, Sam Pablo is using IBM JVM. See my post above.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic