您现在的位置:文学月刊 > 现代诗歌 > 正文

JVM 调优 —— GC 长时间停顿问题及解决方法成都足球主题酒吧

发表于:2019-07-11 15:35 来源:本站原创

JVM 调优 —— GC 长时间停顿问题及解决方法成都足球主题酒吧

原文出处:文牛武人零.简介垃圾收集器长时间停顿,表现在Web页面上可能是页面响应码500之类的服务器错误问题,如果是个支付过程可能会导致支付失败,将造成公司的直接经济损失,程序员要尽量避免或者说减少此类情况发生。 一.并发模式失败(concurrentmodefailure)并发模式失败日志:2016-02-21T13:53:+0800::[GC[1CMS-initial-mark:1436199K(1560576K)]1512927K(2504320K),][Times:user==,real=]2016-02-21T13:53:+0800::[CMS-concurrent-mark-start]2016-02-21T13:53:+0800::[CMS-concurrent-mark:/][Times:user==,real=]2016-02-21T13:53:+0800::[CMS-concurrent-preclean-start]2016-02-21T13:53:+0800::[CMS-concurrent-preclean:/][Times:user==,real=]2016-02-21T13:53:+0800::[CMS-concurrent-abortable-preclean-start]{HeapbeforeGCinvocations=88667(full45):parnewgenerationtotal943744K,used914399K[0x0000000757000000,0x0000000797000000,0x0000000797000000)edenspace838912K,100%used[0x0000000757000000,0x000000078a340000,0x000000078a340000)fromspace104832K,72%used[0x000000078a340000,0x000000078ecf7d98,0x00000007909a0000)tospace104832K,0%used[0x00000007909a0000,0x00000007909a0000,0x0000000797000000)concurrentmark-sweepgenerationtotal1560576K,used1436199K[0x0000000797000000,0x00000007f6400000,0x00000007f6400000)concurrent-mark-sweeppermgentotal159744K,used78413K[0x00000007f6400000,0x0000000800000000,0x0000000800000000)2016-02-21T13:53:+0800::[GC2016-02-21T13:53:+0800::[ParNewDesiredsurvivorsize53673984bytes,newthreshold6(max6)-age1:7100568bytes,7100568total-age2:4676456bytes,11777024total-age3:8773736bytes,20550760total-age4:7709744bytes,28260504total-age5:10891960bytes,39152464total-age6:11735032bytes,50887496total:914399K-75616K(943744K),]2350599K-1517225K(2504320K),][Times:user==,real=]HeapafterGCinvocations=88668(full45):parnewgenerationtotal943744K,used75616K[0x0000000757000000,0x0000000797000000,0x0000000797000000)edenspace838912K,0%used[0x0000000757000000,0x0000000757000000,0x000000078a340000)fromspace104832K,72%used[0x00000007909a0000,0x0000000795378128,0x0000000797000000)tospace104832K,0%used[0x000000078a340000,0x000000078a340000,0x00000007909a0000)concurrentmark-sweepgenerationtotal1560576K,used1441609K[0x0000000797000000,0x00000007f6400000,0x00000007f6400000)concurrent-mark-sweeppermgentotal159744K,used78413K[0x00000007f6400000,0x0000000800000000,0x0000000800000000)}2016-02-21T13:53:+0800::[CMS-concurrent-abortable-preclean:/][Times:user==,real=]2016-02-21T13:53:+0800::[GC[YGoccupancy:497152K(943744K)]2016-02-21T13:53:+0800::[Rescan(parallel),]2016-02-21T13:53:+0800::[weakrefsprocessing,]2016-02-21T13:53:+0800::[classunloading,]2016-02-21T13:53:+0800::[scrubsymboltable,]2016-02-21T13:53:+0800::[scrubstringtable,][1CMS-remark:1441609K(1560576K)]1938761K(2504320K),][Times:user==,real=]2016-02-21T13:53:+0800::[CMS-concurrent-sweep-start]{HeapbeforeGCinvocations=88668(full45):parnewgenerationtotal943744K,used914528K[0x0000000757000000,0x0000000797000000,0x0000000797000000)edenspace838912K,100%used[0x0000000757000000,0x000000078a340000,0x000000078a340000)fromspace104832K,72%used[0x00000007909a0000,0x0000000795378128,0x0000000797000000)tospace104832K,0%used[0x000000078a340000,0x000000078a340000,0x00000007909a0000)concurrentmark-sweepgenerationtotal1560576K,used1441606K[0x0000000797000000,0x00000007f6400000,0x00000007f6400000)concurrent-mark-sweeppermgentotal159744K,used78413K[0x00000007f6400000,0x0000000800000000,0x0000000800000000)2016-02-21T13:53:+0800::[GC2016-02-21T13:53:+0800::[ParNew(promotionfailed)Desiredsurvivorsize53673984bytes,newthreshold6(max6)-age1:4030872bytes,4030872total-age2:5959704bytes,9990576total-age3:4628680bytes,14619256total-age4:8773080bytes,23392336total-age5:7707144bytes,31099480total-age6:10890224bytes,41989704total:914528K-907344K(943744K),]2016-02-21T13:53:+0800::[CMS2016-02-21T13:53:+0800::[CMS-concurrent-sweep:/][Times:user==,real=](concurrentmodefailure):1451903K-475795K(1560576K),]2356134K-475795K(2504320K),[CMSPerm:78413K-78413K(159744K)],][Times:user==,real=]HeapafterGCinvocations=88669(full46):parnewgenerationtotal943744K,used0K[0x0000000757000000,0x0000000797000000,0x0000000797000000)edenspace838912K,0%used[0x0000000757000000,0x0000000757000000,0x000000078a340000)fromspace104832K,0%used[0x000000078a340000,0x000000078a340000,0x00000007909a0000)tospace104832K,0%used[0x00000007909a0000,0x00000007909a0000,0x0000000797000000)concurrentmark-sweepgenerationtotal1560576K,used475795K[0x0000000797000000,0x00000007f6400000,0x00000007f6400000)concurrent-mark-sweeppermgentotal159744K,used78413K[0x00000007f6400000,0x0000000800000000,0x0000000800000000)}两个原因:在CMS启动过程中,新生代提升速度过快,老年代收集速度赶不上新生代提升速度在CMS启动过程中,老年代碎片化严重,http:///zuqiu/,无法容纳新生代提升上来的大对象发送这种情况,应用线程将会全部停止(相当于网站这段时间无法响应用户请求),进行压缩式垃圾收集(回退到SerialOld算法)解决办法:。


最新资讯

搜索排行