jmap -histo 缺少大量内存
我有一个 JVM,总 RAM 为 12 GB,其中 7 GB 分配给老年代。 似乎存在一些内存泄漏,因为几乎整个旧代都已满,并且当我安排GC时不会释放(该进程当时没有做任何其他事情)。
jmap -histo 转储仅显示小于 1 GB 的对象。失踪的6场演出在哪里?您建议使用什么更好的工具来诊断此问题?
这是 jmap 输出的顶部:
num #instances #bytes class name
----------------------------------------------
1: 429853 68725736 <constMethodKlass>
2: 429853 51594040 <methodKlass>
3: 37503 49611368 <constantPoolKlass>
4: 37503 31109576 <instanceKlassKlass>
5: 191716 28019968 [C
6: 32573 26933152 <constantPoolCacheKlass>
7: 86158 13789560 [I
8: 53532 11244232 [B
9: 284 10507216 [J
10: 137608 7210664 <symbolKlass>
11: 203072 6498304 java.lang.String
12: 10132 5219512 <methodDataKlass>
13: 39694 4128176 java.lang.Class
14: 55713 3792816 [S
15: 61816 3141936 [[I
16: 90109 2883488 java.util.HashMap$Entry
I have a JVM with 12 gigs of total RAM, out of which 7 GB is allocated to the old generation.
There seems to be some memory leak, because almost the entire old gen is full, and will not release when I schedule a GC (the process is not doing anything else at that time).
A jmap -histo dump only reveals less than 1 gigabyte worth of objects. Where are the missing 6 gigs? What better tool do you propose for diagnosing this?
Here is the top of the jmap output:
num #instances #bytes class name
----------------------------------------------
1: 429853 68725736 <constMethodKlass>
2: 429853 51594040 <methodKlass>
3: 37503 49611368 <constantPoolKlass>
4: 37503 31109576 <instanceKlassKlass>
5: 191716 28019968 [C
6: 32573 26933152 <constantPoolCacheKlass>
7: 86158 13789560 [I
8: 53532 11244232 [B
9: 284 10507216 [J
10: 137608 7210664 <symbolKlass>
11: 203072 6498304 java.lang.String
12: 10132 5219512 <methodDataKlass>
13: 39694 4128176 java.lang.Class
14: 55713 3792816 [S
15: 61816 3141936 [[I
16: 90109 2883488 java.util.HashMap$Entry
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论