How to suppress GC statistics

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 prints huge number of PrintGCApplicationStoppedTime lines in zmmailboxd.out. It becomes a resource drain.

The default setup of Zimbra Server is 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 program under the ZimbraCommon directory. In order to turn this option off, we can setup the source code tree and useIDE such as Eclipse to rebuild the zimbracommon.jar.

The 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 printing of these GC statistic lines to zmmailboxd.out file.

Jump to: navigation, search