JMC飞行记录会强制使用Full GC吗? [英] Does JMC Flight Recording force Full GC?

查看:178
本文介绍了JMC飞行记录会强制使用Full GC吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OSB中实现的服务中遇到了一些与性能相关的问题(大多数时间都可以正常工作,并且有时响应时间会从100ms突然增加到4/5s,而没有明显的原因).解释这种情况的一种假设是,在这些高峰期间JVM可能正在执行Full GC,而我们正在使用任务控制来监视JVM.

I am experiencing some performance related issues (works ok most of the time, and from time to time there's a spike in the response time from 100ms to 4/5s with no apparent reason) in services implemented in OSB. One of the hypothesis to explain this situation is the fact that the JVM could be performing a Full GC during those spikes and we are monitoring the JVM using mission control.

管理员告诉我,使用G1GC,JVM已在完全禁用gc的情况下运行,我可以在启动命令中看到这一点:

The admins tell me that the jvm is running with full gc's disabled, using G1GC and I can see that in the startup command:

-XX:+DisableExplicitGC  
-XX:+UseG1GC 
-XX:MaxGCPauseMillis=500 -verbosegc 
-XX:+PrintGCDetails 
-XX:+PrintGCDateStamps 

此外,当我分析gc日志时,没有执行的完整GC的日志记录,我只能找到(基于这些配置才有意义):

Also, when I analyse the gc logs, there's no logging of Full GC's performed, I could only find (which makes sense based on those configurations):

2017-05-02T04:46:10.916-0700: 39228.353: [GC pause (G1 Evacuation Pause) (young), 0.0173177 secs]

但是,一旦我在jmc中打开飞行记录器并开始进行一些负载测试,我就立即注意到正在执行Full GC

However, as soon as I turned on flight recorder in jmc and started some load testing, I immediately noticed Full GCs being performed

我可以在日志中看到它:

and I can see it in the logs:

2017-05-02T05:41:31.297: 548.719: [Full GC (Heap Inspection Initiated GC) 1780->705M(2048M), 3.040 secs]

禁用飞行记录器后,我可以一遍又一遍地运行完全相同的负载测试,并且日志中没有记录完整的GC.

As soon as I disable flight recorder, I can run the exact same load test over and over again and no Full GC's are recorded in the logs.

我在这里丢失了什么吗,还是Flight Recorder真的在强迫JVM执行Full GC?

Am I missing something here, or is Flight Recorder really forcing the JVM to do Full GC's?

致谢

推荐答案

文档

启用了堆统计信息后生成的飞行记录将以旧的GC开始和结束.在GC列表中选择该旧的GC,然后选择常规"选项卡以将GC原因显示为-Heap Inspection Initiated GC.这些GC通常比其他GC花费更长的时间.

The flight recording generated with Heap Statistics enabled will start and end with an old GC. Select that old GC in the list of GCs, and then choose the General tab to see the GC Reason as - Heap Inspection Initiated GC. These GCs usually take slightly longer than other GCs.

这篇关于JMC飞行记录会强制使用Full GC吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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