我们在服务器(tomcat 8.0.33)上观察到90%的堆内存使用情况并开始分析(使用jmap -dump:format=b
命令进行堆转储后)。
详情 -
Jstat -gc输出 -
热门命令输出 -
Visual vm total memory -
Visual vm详情 -
今天的GC日志:
2016-11-02T00:16:58.013-0400: 1791653.461: [GC (Allocation Failure) [PSYoungGen: 1948352K->147200K(1949184K)] 7468597K->5677221K(8240640K), 0.0726273 secs] [Times: user=0.17 sys=0.00, real=0.08 secs]
2016-11-02T01:08:58.585-0400: 1794774.033: [GC (Allocation Failure) [PSYoungGen: 1948416K->147136K(1949184K)] 7478437K->5686965K(8240640K), 0.0704435 secs] [Times: user=0.17 sys=0.00, real=0.07 secs]
2016-11-02T02:00:28.573-0400: 1797864.021: [GC (Allocation Failure) [PSYoungGen: 1948352K->147104K(1949184K)] 7488181K->5696733K(8240640K), 0.0731509 secs] [Times: user=0.17 sys=0.00, real=0.08 secs]
2016-11-02T03:15:56.104-0400: 1802391.552: [GC (Allocation Failure) [PSYoungGen: 1948320K->143664K(1945088K)] 7497949K->5703005K(8236544K), 0.0677412 secs] [Times: user=0.16 sys=0.00, real=0.07 secs]
2016-11-02T04:08:41.166-0400: 1805556.614: [GC (Allocation Failure) [PSYoungGen: 1944880K->135696K(1945600K)] 7504221K->5704773K(8237056K), 0.0684821 secs] [Times: user=0.15 sys=0.00, real=0.07 secs]
2016-11-02T05:00:58.618-0400: 1808694.066: [GC (Allocation Failure) [PSYoungGen: 1932816K->127504K(1925120K)] 7501893K->5706357K(8216576K), 0.0649463 secs] [Times: user=0.15 sys=0.00, real=0.06 secs]
2016-11-02T05:53:38.105-0400: 1811853.553: [GC (Allocation Failure) [PSYoungGen: 1924624K->119504K(1937408K)] 7503477K->5707941K(8228864K), 0.0910155 secs] [Times: user=0.22 sys=0.00, real=0.09 secs]
2016-11-02T06:46:23.946-0400: 1815019.394: [GC (Allocation Failure) [PSYoungGen: 1904336K->111312K(1896448K)] 7492773K->5709485K(8187904K), 0.0652027 secs] [Times: user=0.15 sys=0.00, real=0.06 secs]
问题:
为什么Visual Vm仅显示大约1300 MB的总内存,而top命令显示总内存为7.5 GB。我知道也可能有非堆内存的内存利用率,但jstat命令也确认内存使用率远高于1300 MB。它是否在visual vm上没有正确显示?
分析中的错误是什么?
修改:
进一步调查似乎可能存在堆转储本身问题。找到一篇文章,说明如何使用java 8生成堆转储可能不起作用。此外,在尝试使用jhat分析堆转储时,生成了以下警告
WARNING: Failed to resolve object id 0x78281aec0 for field first (signature L)
WARNING: Failed to resolve object id 0x78391e800 for field unfinalized (signatu
WARNING: Failed to resolve object id 0x5c07e9958 for field clazz (signature L)
WARNING: Failed to resolve object id 0x5c07e9700 for field clazz (signature L)
WARNING: Failed to resolve object id 0x5c07e94f8 for field clazz (signature L)
WARNING: Failed to resolve object id 0x5c07e9368 for field clazz (signature L)
WARNING: Failed to resolve object id 0x5c07e90f0 for field clazz (signature L)
是否有不同的生成堆转储的方法可以正确分析?