下载下来一点dump文件很大,然后使用mat分析的时候mat本身报错
Out of Memory Error while Running the Memory Analyzer
这是因为eclipse配置的内存太小了导致的,网上查了下都是去改MemoryAnalyzer.ini的参数内容
但对于ecplise内置安装插件来说是找不到这个文件的,
去官网查看https://wiki.eclipse.org/MemoryAnalyzer/FAQ
Out of Memory Error while Running the Memory Analyzer
Well, analyzing big heap dumps can also require more heap space. Give it some more memory (possible by running on a 64-bit machine):
MemoryAnalyzer.exe -vmargs -Xmx4g -XX:-UseGCOverheadLimit
Alternatively, edit the MemoryAnalyzer.ini
to contain:
-vmargs-Xmx2g
-XX:-UseGCOverheadLimit
As a rough guide, Memory Analyzer itself needs 32 to 64 bytes for each object in the analyzed heap, so -Xmx2g might allow a heap dump containing 30 to 60 million objects to be analyzed. Memory Analyzer 1.3 using -Xmx58g has successfully analyzed a heap dump containing over 948 million objects.
The initial parse and generation of the dominator tree uses the most memory, so it can be useful to do the initial parse on a large machine, then copy the heap dump and index files to a more convenient machine for further analysis.
For more details, check out the section Running Eclipse in the Help Center. It also contains more details if you are running on Mac OS X.
If you are running the Memory Analyzer inside your Eclipse SDK, you need to edit the eclipse.ini
file.
也就是最后这句话,如果是eclipse内置安装的话就去改eclipse.ini的参数就可以了
另外附linux服务器生成dump文件命令:
jmap -dump:format=b,file=heapdump.phrof pid
来源:oschina
链接:https://my.oschina.net/u/913484/blog/3051618