FULL GC会导致​​stop-the-world​​,频繁的FULL GC会影响系统的可用性。

stackoverflow上有个​​提问​​是这么描述这个问题的:当服务器集群批量启动后,执行FULL GC的频率和时间点大致相同,若FULL GC时间过长,会让负载均衡器觉得各个机器服务不可用,可能导致整个服务下线

  jstat -gc pid intervaltime 可以查看full gc的次数和时间

 

  

应用的JVM启动参数如下:

-Xmx2g -Xms2g -Xmn256m -XX:PermSize=128m -Xss256k-XX:+UseConcMarkSweepGC

新生代:256M

旧生代:1792M(2G-256M)

持久代:128M

栈内存:256KB

新生代回收方式:并行回收

旧生代回收方式:并发回收(CMS)

 

http://liuxi.name/blog/20160608/jvm-full-gc-hourly.html

http://reeboo.iteye.com/blog/1905199

https://www.jianshu.com/p/edea93fff130