Java程序消耗大量内存(增长了Xmx的1.5倍)
我有一个java程序(在内存中执行大量操作)。我已经为进程分配了 10GB java 堆(-Xmx)。系统总内存为30GB。 Java 程序实际上占用了近 24 GB 内存(我可以从 svmon 输出中看到)。 Java 堆利用率低于 10 GB(来自详细 GC)。我想知道剩余内存(24-10 = 14 GB 内存)的用途是什么?是本机堆吗? (我没有任何 JNI 代码或任何其他可以使用 JNI 代码的第三方库)。您能告诉我如何监控本机内存使用情况吗?
操作系统:AIX
Java:IBM JVM 1.6
CPU:Power 7 SMT -4
I have one java program (doing lot of in memory operations). I have allocated 10GB java heap to the process (-Xmx). Total memory of the system is 30 GB. Java program is actually taking almost 24 GB of memory (I can see from svmon output). Java heap utlization is below 10 GB (from verbose GC). I would like to know what is using the rest of the memory (24-10 = 14 GB of memory)? Is it native heap? ( I dont have any JNI code or any other third party libray which can using JNI code). Could you please tell how can I monitor native memory usage?
OS :AIX
Java : IBM JVM 1.6
CPU : Power 7 SMT -4
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
另一种类型的内存是非堆内存。尝试使用 JConsole 监控情况。
在这个关于 YourKit 的页面中,我读到:
The other type of memory is non heap memory. Try to monitor the situation with JConsole.
In this page about YourKit I read:
你用过任何分析器吗?这将帮助您查明哪些对象正在消耗内存和哪些对象正在消耗内存。 RAM 中发生了什么
have you used any profiler? that will help you pin point what objects are consuming memory & what is happening in RAM
谢谢你的记忆。
我只是把它放在这里: https://www.ibm.com/ developerworks/java/library/j-nativememory-aix/
Thanks for the memory.
I just put this here: https://www.ibm.com/developerworks/java/library/j-nativememory-aix/
IBM JMAT 是一个很好的工具,但是内存很大来分析。您如何确定您正在使用的内存量适合您正在操作的对象?对于这么大的调用堆栈,我会开始探测泄漏的引用。
The IBM JMAT is a good tool, but that's a lot of memory to analyze. How certain are you that the amount of memory you're utilizing is appropriate for the objects you're manipulating? With a call stack that large I'd start probing for leaky references.