问题描述
我从一个用完了堆空间的Java进程中提取了1 GB的堆转储.我已将堆上传到java6发行版随附的jvisualm中.我大约在16小时前启动了计算保留的大小"过程,并且该过程仍在运行.1GB堆中前20个对象的计算保留大小应运行多长时间?我应该期待它完成吗?
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?
推荐答案
这似乎在我的机器上也永远存在,但是我从任务管理器中注意到,似乎不再发生任何事情(低CPU使用率,磁盘I/O).原因是,尽管进度指示器一直显示动画,但是根据日志文件,该操作已被静默中止.
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:
- 点击帮助
- 点击关于
- 单击日志文件
这显示了我在日志的底部:
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)
默认情况下,我的64位Java VM堆大小将限制为计算机内存的25%(甚至更低的VisualVM内置限制).为了解决下一个问题,我将尝试再次启动VisualVM,如下所示:
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
这篇关于1GB堆在可视VM中运行计算保留大小需要多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!