我必须分析大小为35-40GB的java堆转储,除了大型内存的远程服务器之外,它不能加载到本地机器上。
我发现分析大型Java堆转储的工具是目前为止最好的链接。但是在配置了所有的东西并正确地执行了所有命令行之后,我无法获得任何报告文件。
我的ParseHeapDump.sh文件看起来像
#!/bin/sh
#
# This script parses a heap dump.
#
# Usage: ParseHeapDump.sh <path/to/dump.hprof> [report]*
#
# The leak report has the id org.eclipse.mat.api:suspects
# The top component report has the id org.eclipse.mat.api:top_components
#
./MemoryAnalyzer -consolelog -application org.eclipse.mat.api.parse "$@" -vmargs -Xms8g -Xmx10g -XX:-UseGCOverheadLimit而MemoryAnalyzer.ini文件看起来像
-startup
plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.700.v20180518-1200
java -Xmx8g -Xms10g -jar plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar -consoleLog -consolelog -application org.eclipse.mat.api.parse "$@"
-vmargs
-Xms8g
-Xmx10g请告诉我,如果我做任何错误的配置,或建议我任何其他工具在市场上可用。
发布于 2020-09-22 06:03:32
处理大型堆转储是一个挑战。VisualVM和Eclipse都需要太多的内存来按几十个GiB的顺序处理堆转储。
商业分析器显示出更好的效果(特别是YourKit),尽管我不确定它们的实际极限。
为了常规地处理100+ GiB,我给您提供了基于VisualVM (实际上是Netbeans)的代码库的无头解决方案哈普林。
Heaplib是图形化的,也不是交互式的。它面向自动报告。工具允许您用OQL/JavaScript (如果您愿意)编写堆分析代码(如果您愿意的话),尽管功能是有限的,以适应内存需求。处理100 for可能需要小时,但对于非交互式工作流是可以接受的。
https://stackoverflow.com/questions/63997436
复制相似问题