Android gc overhead limit exceeded
org.broadinstitute.sting.utils.exceptions.ReviewedStingException: An error occurred during the traversal.
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 2.0-35-gb3e7fbe):
##### ERROR
##### ERROR Please visit the wiki to see if this is a known problem
##### ERROR If not, please post the error, with stack trace, to the GATK forum
##### ERROR Visit our website and forum for extensive documentation and answers to
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: An error occurred during the traversal.
##### ERROR ------------------------------------------------------------------------------------------
finish at time 2012-10-22 21:02
问题产生原因:
根据sun的说法: "if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown."
jvm gc行为中超过98%以上的时间去释放小于2%的堆空间时会报这个错误。
处理方法:
1. 在jvm启动参数中添加 "-XX:-UseGCOverheadLimit",该参数在JDK6中默认启用("-XX:+UseGCOverheadLimit")。
调整后的生产环境中使用的参数为:
JAVA_OPTS=‘-Xms512m -Xmx4096m -XX:MaxPermSize=128m -XX:-UseGCOverheadLimit -XX:+UseConcMarkSweepGC‘
2. 检查是否有使用了大量内存的代码或死循环
3. 使用jstat命令监控gc行为是否正常
jstat监控gc的命令格式为:
jstat -gcutil [-t] [-h] [ []]
vmid为JVM进程id,可以用ps -ef 或 jps -lv命令查找。
以下命令为每1秒钟输出一次gc状态,共输入5次
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 93.34 85.63 82.95 59.73 1085 33.351 58 4.396 37.748
98.42 0.00 31.89 83.52 59.73 1088 33.487 58 4.396 37.883
100.00 85.65 100.00 84.08 59.73 1091 33.554 58 4.396 37.950
0.00 100.00 54.30 84.49 59.73 1093 33.660 58 4.396 38.057
98.25 0.00 10.46 85.11 59.73 1096 33.768 58 4.396 38.164
经过一段时间的观察,确认是否正确
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。