[英]Eclipse MAT Parsing 11GB Heap dump - Out Of Memory. Unable to parse the heap dump
I was trying to parse the 11GB heap dump using Eclipse MAT and I am getting the following error我试图使用 Eclipse MAT 解析 11GB 堆转储,但出现以下错误
An internal error occurred during: "Parsing heap dump"
I think the MAT is unable to parse such a huge heap dump.我认为 MAT 无法解析如此巨大的堆转储。 I read some posts and increase the VM configurations to more than 80% of the dump size.我阅读了一些帖子并将 VM 配置增加到转储大小的 80% 以上。 Following are my vm configurations以下是我的虚拟机配置
-vmargs -Xms8192m -Xmx10240m
and I am still not able to load the dump.我仍然无法加载转储。 I tried with ParseHeapDump.bat with no changes ...我尝试使用 ParseHeapDump.bat 没有任何变化......
Keep increasing Xmx
till the JVM complains, then increase your swap file size, then increase Xmx
again, etc.继续增加Xmx
直到 JVM 抱怨,然后增加交换文件大小,然后再次增加Xmx
, Xmx
。
At that stage it will take ages because it will be using disk as RAM.在那个阶段,它需要很长时间,因为它将使用磁盘作为 RAM。
I recently installed Eclipse MAT (Eclipse Memory Analyzer Version 1.9.1) on Mac OS Catalina (10.15.3).我最近在 Mac OS Catalina (10.15.3) 上安装了 Eclipse MAT(Eclipse Memory Analyzer Version 1.9.1)。 I needed to review a 4g heap dump.我需要查看 4g 堆转储。 The default JVM heap size for MAT is 1024m. MAT 的默认 JVM 堆大小为 1024m。
I think the easiest way to increase the JVM's heap size is to use a shell window - go to the /Applications/mat.app/Contents/Eclipse/ folder.我认为增加 JVM 堆大小的最简单方法是使用 shell 窗口 - 转到 /Applications/mat.app/Contents/Eclipse/ 文件夹。 Then vi MemoryAnalyzer.ini and change -Xmx1024m to your required value, in my case I went with -Xmx10g.然后 vi MemoryAnalyzer.ini 并将 -Xmx1024m 更改为您需要的值,在我的情况下,我选择了 -Xmx10g。
To review the change, restart MAT and go to the help -> About Eclipse Memory Analyzer then click installation details, and look for the entry: eclipse.vmargs=-Xmx10g about 50 lines down.要查看更改,请重新启动 MAT 并转到帮助 -> 关于 Eclipse 内存分析器,然后单击安装详细信息,并查找条目:eclipse.vmargs=-Xmx10g 大约 50 行。
On the Windows install of Eclipse Photon, I got around the problem by updating the memory parameters in the eclipse.ini file.在 Eclipse Photon 的 Windows 安装中,我通过更新 eclipse.ini 文件中的内存参数解决了这个问题。 This was directly under my c:\\eclipse
folder.这是直接在我的c:\\eclipse
文件夹下。
-Xms6g
-Xmx6g
I tried setting it to 4 gigs for a memory dump that was about 4.1GB and it failed.我尝试将其设置为 4 gigs 以进行大约 4.1GB 的内存转储,但失败了。 So, the rule of thumb is to set it to a higher value than the size of the memory dump.因此,经验法则是将其设置为比内存转储大小更高的值。
This setup worked for me.这个设置对我有用。
I also recently installed Eclipse MAT to analyze a 4.85GB
heap dump file.我最近还安装了 Eclipse MAT 来分析一个4.85GB
堆转储文件。
Eclipse Memory Analyzer Version: 1.11.0
MacOS Catalina: 10.15.7
Hardware Memory: 16GB
Heap dump file size: 4.85GB
Heap dump file type: PHD
Classes: 33.6k
Objects: 4.8m
Class Loader: 575
I changed the MemoryAnalyzer.ini
to 14GB
as follows:我将MemoryAnalyzer.ini
更改为14GB
,如下所示:
-vmargs
-Xmx14g
I also confirmed the configuration as follows:我还确认了配置如下:
Help -> About Eclipse Memory Analyzer 1.11.0
Installation Details
点击Installation Details
Configuration
tab单击Configuration
选项卡eclipse.vmargs=-Xmx14g
.寻找eclipse.vmargs=-Xmx14g
。It took some minutes to load this 4.85 heap dump file.加载这个 4.85 堆转储文件需要几分钟时间。
Note: I unsuccessfully tried Xmx
setup with 2g, 4g, 8g, 10g, 12g - all failed with JVM out-of-memory in the Eclipse MAT tool.注意:我尝试使用 2g、4g、8g、10g、12g 设置Xmx
失败 - 都失败了,因为 Eclipse MAT 工具中的 JVM 内存不足。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.