java - 了解 GC 日志 - 应用程序线程已停止

标签 java multithreading garbage-collection garbage

查看 GC 日志文件,不言而喻即可了解应用程序已停止 0.0011450 秒(停止世界)

Total time for which application threads were stopped: 0.0011450 seconds

但是,请帮我理解下面几行是否也意味着停止世界?或者它只是显示每个线程所花费的时间,real=TIME 是什么意思(下面最后一行)?

Finished work stealing in 3th thread: 13.706 sec
Finished work stealing in 2th thread: 17.325 sec
Finished work stealing in 4th thread: 17.052 sec
Finished work stealing in 0th thread: 17.325 sec
Finished work stealing in 1th thread: 17.324 sec
2015-08-19T03:20:32.882-0400: 321985.669: [CMS-concurrent-mark: 20.519/20.624 secs] (CMS-concurrent-mark yielded 6 times)
 [Times: user=138.91 sys=0.10, real=20.62 secs] 

最佳答案

This oracle blog post是谷歌搜索“CMS-concurrent-mark”时的第一个结果,并解释了各个 CMS 阶段。

通过 GCviewer 运行日志还将分别列出 STW 和非 STW 阶段。

由于您已经打开了应用程序停止时间日志记录,因此无论是否是 STW 暂停,缺少停止时间日志记录条目都应该是一个致命的弱点。

what does real=TIME means (last line below)?

此输出相当于您从 time 获得的输出例如。另请参阅this SO answer 。或this one具体引用 CMS 日志。

关于java - 了解 GC 日志 - 应用程序线程已停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32120571/

相关文章:

java - 使用 Predicate 和 Criteria API 进行不区分大小写的搜索

java - 如何从我的休息服务发送一个 json 对象,以便我可以在客户端 javascript 中解析

java - 使用 Microsoft Graph 通过 Java Cron 作业发送动态电子邮件

C# 应用程序创建许多连接线程,MySQL

c# - 会不会出现垃圾回收器因为异常而无法运行的场景?

java - JProfiler 9.2 "CMS Old Gen"内存池中有哪些对象?

java - Java Flight Recorder 结果中的垃圾收集统计信息

java - 如果作为现有 Android 源代码导入,Facebook SDK 会导致 google-play-services-lib 崩溃

multithreading - Postgresql parallel bulk INSERT with worker 不并行化

c++ - boost 多线程和共享变量