简体   繁体   中英

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? I started profiling about 2 hours back and its only 20% done as of now. Total memory used by jvm since I started profiling has gone up to 150G (close to RAM size). Is it normal for high memory processes to take huge amount of time while profiling using yourkit or I am doing something wrong. Is it possible that since memory has reached to RAM memory lots of disk swapping is happening which is slowing down memory profiling. 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?

Well your JVM is big :)

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 :

jmap -histo:live <pid>

It will print all live objects (:live does a gc) in the heap, their instances number, and their (shallow) size.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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