JMC飞行记录会强制使用Full GC吗? [英] Does JMC Flight Recording force 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?
致谢