转载

Concurrent Mode Failure

The CMS collector uses one or more garbage collector threads that run simultaneously with the application threads with the goal of completing the collection of the tenured generation before it becomes full. As described previously, in normal operation, the CMS collector does most of its tracing and sweeping work with the application threads still running, so only brief pauses are seen by the application threads. However, if the CMS collector is unable to finish reclaiming the unreachable objects before the tenured generation fills up, or if an allocation cannot be satisfied with the available free space blocks in the tenured generation, then the application is paused and the collection is completed with all the application threads stopped. The inability to complete a collection concurrently is referred to as concurrent mode failure and indicates the need to adjust the CMS collector parameters. If a concurrent collection is interrupted by an explicit garbage collection (System.gc()) or for a garbage collection needed to provide information for diagnostic tools, then a concurrent mode interruption is reported.

CMS使用一个或多个线程和应用线程并发进行,目标是在老生代被消耗完之前完成垃圾回收。如前所述,在正常操作中,CMS收集器执行大部分追踪和清理工作时,应用程序线程仍在运行,因此应用线程只会短暂暂停。但是,如果在垃圾回收完成前,老生代被耗尽,或者老生代无法分配足够的空间,此时会暂停所有的应用线程(导致了STW)直到垃圾回收完成。没有在并发期间完成垃圾回收工作称为 concurrent mode failure ,这个失败表明我们需要调整CMS收集器的参数。如果并发回收被显示调用(System.gc()) 或者为了给诊断工具提供信息而发生中断,则会报告并发模式中断。

官方文档链接

原文  https://segmentfault.com/a/1190000023082726
正文到此结束
Loading...