Java GC升级失败 [英] Java GC Promotion Failures

查看:61
本文介绍了Java GC升级失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有16G堆大小,在Java 6u43上,Young Gen = 4G,Old Gen = 12G.我看到以下促销失败.

I have a 16G Heap size, with Young Gen = 4G and Old Gen = 12G on Java 6u43. I saw the following promotion failure.

有趣的是在故障发生之前,老一代的大小从12G下降到9G,而年轻一代的大小从3.4G下降到0.3G.但是晋升还是失败了.

Whats interesting is right before the failure happened, the old gen size dropped from 12G to 9G, and young gen dropped from 3.4G to 0.3. But still promotion failed.

我的 CMSIntitiatingOccupancyFraction = 75%且 CMSInitiatingOccupancyOnly = true.任何帮助将不胜感激

My CMSIntitiatingOccupancyFraction = 75% and CMSInitiatingOccupancyOnly=true. Any help will be appreciated

2014-04-15T06:11:37.275-0400: 200306.377: [GC 200306.377: [ParNew
Desired survivor size 214728704 bytes, new threshold 15 (max 15)
  58106 - age   1:      27984 bytes,      27984 total
  58107 - age   2:  111513120 bytes,  111541104 total
  58108 - age   3:   28811760 bytes,  140352864 total
  58109 - age   4:   32949056 bytes,  173301920 total
  58110 : 266825K->240137K(3774912K), 0.0547210 secs] 9338952K->9312265K(16357824K), 0.0551270 secs] [Times: user=0.95 sys=0.00, real=0.05 secs]
  58111 2014-04-15T06:11:49.838-0400: 200318.940: [GC 200318.940: [ParNew
  58112 Desired survivor size 214728704 bytes, new threshold 3 (max 15)
  58113 - age   1:  136690632 bytes,  136690632 total
  58114 - age   2:       1768 bytes,  136692400 total
  58115 - age   3:  110476248 bytes,  247168648 total
  58116 - age   4:   26402960 bytes,  273571608 total
  58117 - age   5:   33863440 bytes,  307435048 total

[Times: user=1.69 sys=0.00, real=0.10 secs]
  58119 2014-04-15T06:11:57.424-0400: 200326.526: [GC 200326.526: [ParNew (0: promotion failure size = 6)  (1: promotion failure size = 6)  (2: promotion failure size = 6)  (3: promotion failure size = 6)  (        4: promotion failure size = 6)  (5: promotion failure size = 6)  (6: promotion failure size = 6)  (7: promotion failure size = 6)  (8: promotion failure size = 12)  (9: promotion failure size = 6)  (        10: promotion failure size = 6)  (11: promotion failure size = 6)  (12: promotion failure size = 6)  (13: promotion failure size = 6)  (14: promotion failure size = 12)  (15: promotion failure size =         6)  (16: promotion failure size = 12)  (17: promotion failure size = 6)  (promotion failed)

推荐答案

CMS在旧版本中收集时不会对堆进行任何碎片处理.因此,您可能有足够的可用空间,但是它不是连续的,因此是失败的.

CMS does not do any fragmentation of the heap when it collects in old generation. So, you might have enough free space, but it is not contiguous, thus the failure.

我认为在此之后,您将获得一个长时间的完整GC呼叫,这将导致整个使用权空间发生一个较长的Stop-The-World事件;GC会产生碎片.

I assume that after this you will get a long full GC call, that will result in a long Stop-The-World event for the entire tenured space; GC does fragmentation.

编辑,您可以尝试减小年轻一代的大小并增加旧一代的大小,也可以尝试在每个步骤上压缩(但不完全)堆的G1收集器.

EDIT You can try to decrease the young gen size and increase the old gen size or you can try the G1 collector that does compact the heap (not entirely though) on each step.

这篇关于Java GC升级失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆