How to suppress GC statistics

Revision as of 06:23, 9 January 2011 by Singkoo (talk | contribs) (How to suppress GC statistics)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to suppress GC statistics

Author - Sing Koo

GC statistic is useful in JVM memory parameter tuning. When it is no long being used, one may want to turn it off. Zimbra Server from print huge number of PrintGCApplicationStoppedTime lines in zmmailboxd.out. It becomes a resource drain.

The default setup of Zimbra Server to to print start and stop time of applications caused by memory garbage collection. This translates into a voluminous repetitive printing of lines like:

Total time for which application threads were stopped: 0.0142910 seconds

When this information is not being used, we can reclaim the disk, processor and JVM resource by turning off this JVM option. Apparently, this JVM option is not set at script time. It is set in the LC.java program under the ZimbraCommon directory. In order to turn this option off, we can setup the source code tree and use and IDE such as Eclipse to rebuild the zimbracommon.jar.

The LC.java program contains a statement that sets the JVM command line options:

mailboxd_java_options.setDefault("-server -Djava.awt.headless=true -XX:+UseConcMarkSweepGC -XX:NewRatio=2 -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime");

By turning the '+' sign to '-', and then redeploy the zimbracommon.jar file, we can eliminate the printer of these GC statistic lines to zmmailboxd.out file.

Jump to: navigation, search