Reading for ParNew (promotion failed) and (concurrent mode failure)

http://java-monitor.com/forum/showthread.php?t=645

Dear All,

If you are struggling to understand the messages ParNew (promotion failed) and (concurrent mode failure), you might want to bone up on memory management and garbage collector internals.

ParNew (promotion failed): This means that your old generation has become fragmented and the data from Eden might not fit into a large enough contiguous chunk in old.

https://java.sun.com/j2se/reference/...whitepaper.pdf
http://blogs.sun.com/jonthecollector...the_sum_of_the

(concurrent mode failure): The GC predicts that the CMS collection will not complete in time before the Old generation becomes full. It aborts the run and does a stop-the-world instead.

http://blogs.sun.com/jonthecollector...t_the_heck_s_a

Kees Jan


Dear All,

Oh, and how to resolve these? Well, you have to experiment. Each option has downsides and may or may not make them unusable for your situation. Sorry, but there is no clear-cut answer.

ParNew (promotion failed): reduce Eden size, increase heap size.

(concurrent mode failure): make the GC kick in sooner with -XX:+CMSIncrementalMode and/or setting -XX:CMSInitiatingOccupancyFraction to lower than the default value.

Here is documentation on the JVM switches: http://blogs.sun.com/watt/resource/j...ions-list.html

Kees Jan

ParNew GC是JVM中的一种垃圾回收器,它是基于并行垃圾回收算法的,主要用于新生代的垃圾回收。ParNew GC在垃圾回收时使用多个线程并行地进行垃圾回收,以达到快速回收内存的目的。 ParNew GC与Serial GC的主要区别是:ParNew GC是使用多线程并行处理的,而Serial GC是单线程处理的。在垃圾回收时,ParNew GC会将堆内存分成多个区域,然后使用多个线程并行地进行垃圾回收。这样能够有效地减少垃圾回收的时间,提高应用程序的吞吐量。 ParNew GC的垃圾回收过程分为以下几个阶段: 1. 初始标记阶段(Initial Mark):在这个阶段中,ParNew GC会暂停应用程序,然后标记出所有根对象以及所有直接引用的对象。 2. 并发标记阶段(Concurrent Mark):在这个阶段中,ParNew GC会使用多个线程并发地标记所有存活的对象。这个阶段与应用程序并发执行,所以不会造成应用程序的停顿。 3. 重新标记阶段(Remark):在这个阶段中,ParNew GC会再次暂停应用程序,然后标记出在并发标记阶段中被引用的对象。 4. 并发清理阶段(Concurrent Cleanup):在这个阶段中,ParNew GC会使用多个线程并发地清理无用的对象。这个阶段与应用程序并发执行,所以不会造成应用程序的停顿。 ParNew GC的优点是速度快,因为它使用多线程并行处理。另外,它的停顿时间相对较短,对于对响应时间有要求的应用程序来说,ParNew GC是一个不错的选择。但是,ParNew GC也有一些缺点,比如它需要更多的内存来存储垃圾回收信息,而且需要更多的CPU时间来进行垃圾回收。另外,ParNew GC只能用于新生代的垃圾回收,不能用于老年代的垃圾回收。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值