I have a 1 GB heap dump from a java process that ran out of heap space. I have uploaded the heap into jvisualm that comes with a java6 distribution. I started the "compute retained sizes" process around 16 hours ago and it is still running. How long should it take to run the compute retained sizes for the top 20 objects on a 1GB heap? Should I expect it to ever finish?
It seems to take forever on my machine as well, but I noticed from the taskmanager that nothing seemed to happen anymore (low CPU uage, Disk I/O). The reason was that although the progress indicator keeps showing an animation the action was silently aborted according to the log file.
To open the log I used these steps:
- Click Help
- Click About
- Click Logfile
This showed me at the bottom of the log:
SEVERE [org.openide.util.RequestProcessor]
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.HashMap.newNode(HashMap.java:1734)
at java.util.HashMap.putVal(HashMap.java:630)
at java.util.HashMap.put(HashMap.java:611)
at java.util.HashSet.add(HashSet.java:219)
at org.netbeans.lib.profiler.heap.DominatorTree.intersect(DominatorTree.java:279)
at org.netbeans.lib.profiler.heap.DominatorTree.computeOneLevel(DominatorTree.java:114)
at org.netbeans.lib.profiler.heap.DominatorTree.computeDominators(DominatorTree.java:64)
at org.netbeans.lib.profiler.heap.HprofHeap.computeRetainedSize(HprofHeap.java:537)
at org.netbeans.lib.profiler.heap.HprofHeap.computeRetainedSizeByClass(HprofHeap.java:594)
at org.netbeans.lib.profiler.heap.ClassDump.getRetainedSizeByClass(ClassDump.java:102)
at org.netbeans.modules.profiler.heapwalk.HeapFragmentWalker.computeRetainedSizes(HeapFragmentWalker.java:100)
at org.netbeans.modules.profiler.heapwalk.ClassPresenterPanel$1$1.run(ClassPresenterPanel.java:187)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1393)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2003)
By default my 64 bit Java VM Heapsize will be limited to 25% of my computer memory (or even a much lower VisualVM builtin limit). To solve this issue for my next attempt I wil try again starting VisualVM like this:
jvisualvm.exe -J-Xmx16g
After this the log shows at startup:
Heap memory usage: initial 24,0MB maximum 14563,6MB
I had a 600MB heap that just took 900 CPU-minutes of time to compute retained sizes. That's 15 hours. I would assume it's very related to what's on the heap, so I won't extrapolate to your heap (also you pointed out it didn't finish ;), but it's another data point.
© 2022 - 2024 — McMap. All rights reserved.