Steps to enable java log gc activities

Copy file to shared folder java

To let JVM or java log gc activities we have to add/append the following option to existing JAVA_OPTIONS in the weblogic/websphere startup scripts:

export VERBOSE_GC_OPTIONS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/opt/verbose/logs/gc.log -XX:+PrintClassHistogram"
export JAVA_OPTIONS="${VERBOSE_GC_OPTIONS}"

This requires a managed server restart to enable functionality.

 

GC threashold’s can be set using below parameters but be careful it may hamber the performance

-XX:MaxGCMinorPauseMillis
-XX:MaxGCPauseMilli

You need to be careful with the settings, as low value setting can affect your overall throughput. The values should be set based on your performance requirements. There is no generic value that we can recommend.

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

1 Response

  1. I never thought of it that way, well put!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.