什么是“保留大小”在jVisualVM的内存检查器中意味着什么? [英] What does "retained size" mean in jVisualVM's memory inspector?

查看:554
本文介绍了什么是“保留大小”在jVisualVM的内存检查器中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

摘要选项卡上的Jvisualvm堆转储具有按保留大小检查bigest对象的功能。

Jvisualvm heap dump on summary tab has functionality to inspect bigest objects by retained size.

保留的真正含义是什么?如何计算和显示对象树的大小?

如果我可以在这里看到对象(10M)和它的成员对象(5M)我应该如何计算堆影响。它们都占用了10M或15M的堆吗?

为什么我看不到我们的外观巨大的应用程序对象?

What does retained really mean? How size of an object tree is calculated and shown here?
In case I can see here object (10M) and it's member object (5M) how should I calculate heap impact. Does both of them took 10M or 15M of the heap?
Why I can't see none of our facade huge application objects?

谢谢。

推荐答案


什么保留真的意味着什么?

What does retained really mean?

完整的gc后有多大。例如。在GC之后,具有大量条目的WeakHashMap可能为空。

How big it would be after a full gc. E.g. a WeakHashMap with a large number of entries could be empty after a GC.


如何计算对象树的大小并在此处显示?

How size of an object tree is calculated and shown here?

JVM使用内部API确定这一点。

The JVM determines this using an internal API.


如果我可以在这里看到对象(10M)和它的成员对象(5M),我应该如何计算堆影响。它们都是10M还是15M的堆?

In case I can see here object (10M) and it's member object (5M) how should I calculate heap impact. Does both of them took 10M or 15M of the heap?

总数是10 MB。如果这是你最大的问题,除非你的机器只有几百MB,否则不用担心。 (在这种情况下我会升级它)

The total is 10 MB. If this is your biggest problem, wouldn't worry about it unless you have a machine with only a few 100 MB. (In which case I would upgrade it)


为什么我看不到任何外观巨大的应用程序对象?

Why I can't see none of our facade huge application objects?

也许它们的内存不像你想象的那么大?例如它们的加载成本可能很高,但这并不会使它们变得庞大。

Perhaps they are not as big in memory as you think?? e.g. they may be expensive to load, but that doesn't make them huge.

BTW:VisualVM是一个不错的免费内存分析器,但它只对查找明显的问题很有用。我会尝试像YourKit这样的商业分析器(您可以获得免费的eval许可证)进行比较。

BTW: VisualVM is a nice free memory profiler but its only useful for finding obvious problems. I would try a commercial profiler like YourKit (which you can get a free eval license for) for comparison.

这篇关于什么是“保留大小”在jVisualVM的内存检查器中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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