简体   繁体   English

使用yourkit进行内存分析时花费的时间

[英]Time taken during memory profiling using yourkit

How much time does it generally take to profile a java application which is at about 100G memory consumption on a 150G machine? 在150G机器上配置一个大约消耗100G内存的Java应用程序通常需要花费多少时间? I started profiling about 2 hours back and its only 20% done as of now. 大约2小时后,我开始进行性能分析,到目前为止,它仅完成了20%。 Total memory used by jvm since I started profiling has gone up to 150G (close to RAM size). 自从我开始分析以来,jvm使用的总内存已达到150G(接近RAM大小)。 Is it normal for high memory processes to take huge amount of time while profiling using yourkit or I am doing something wrong. 高内存进程在使用yourkit进行性能分析时花费大量时间是正常的,还是我做错了什么。 Is it possible that since memory has reached to RAM memory lots of disk swapping is happening which is slowing down memory profiling. 由于内存已到达RAM内存,是否有可能发生大量磁盘交换,这会减慢内存分析的速度。 How can I make this process faster. 我怎样才能使这个过程更快。 If its not possible to make it faster, what are the other ways to investigate memory leak in a java application? 如果无法使其更快,调查Java应用程序中的内存泄漏的其他方法有哪些?

Well your JVM is big :) 嗯,你的JVM 大:)

If you have a running JVM, the fastest way to get some informations about the objects in your heap is to take a jmap histogram : 如果您有正在运行的JVM,获取有关堆中对象的某些信息的最快方法是获取jmap直方图:

jmap -histo:live <pid>

It will print all live objects (:live does a gc) in the heap, their instances number, and their (shallow) size. 它将打印堆中的所有活动对象(:live执行gc),其实例编号和(浅)大小。

Of course it isn't suited for complicated analysis, but it is often enough for you to find a leak, especially if the leak is big : compare the histogram with the one you have before the leak. 当然,它不适合进行复杂的分析,但通常足以发现泄漏,尤其是在泄漏较大的情况下:将直方图与泄漏前的直方图进行比较。

See doc at http://docs.oracle.com/javase/7/docs/technotes/tools/share/jmap.html . 请参阅http://docs.oracle.com/javase/7/docs/technotes/tools/share/jmap.html上的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM