How to suppress GC statistics: Difference between revisions
m (moved Talk:How to modify JAVASCRIPT used by Zimbra? to How to suppress GC statistics: wrong topic) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
How to suppress GC statistics | {{Archive}}How to suppress GC statistics | ||
Author - [http://wiki.zimbra.com/wiki/User:Singkoo Sing Koo] | Author - [http://wiki.zimbra.com/wiki/User:Singkoo 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. | 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 | Zimbra Server prints huge number of PrintGCApplicationStoppedTime lines in zmmailboxd.out. It becomes a | ||
resource drain. | resource drain. | ||
The default setup of Zimbra Server | 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: | This translates into a voluminous repetitive printing of lines like: | ||
Line 15: | Line 15: | ||
turning off this JVM option. Apparently, this JVM option is not set at script time. It is set in the LC.java program | 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 | under the ZimbraCommon directory. In order to turn this option off, we can setup the source code tree | ||
and | and useIDE such as Eclipse to rebuild the zimbracommon.jar. | ||
The LC.java program contains a statement that sets the JVM command line options: | The LC.java program contains a statement that sets the JVM command line options: | ||
Line 21: | Line 21: | ||
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"); | 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 | 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. | these GC statistic lines to zmmailboxd.out file. | ||
[[Category:Administration]] | [[Category:Administration]] |
Latest revision as of 18:30, 24 March 2015
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 LC.java 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 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 printing of these GC statistic lines to zmmailboxd.out file.