简体   繁体   English

分析Java堆转储时耗尽内存

[英]Running out of memory while analyzing a Java Heap Dump

I have a curious problem, I need to analyze a Java heap dump (from an IBM JRE) which has 1.5GB in size, the problem is that while analyzing the dump (I've tried HeapAnalyzer and the IBM Memory Analyzer 0.5 ) the tools runs out of memory I can't really analyze the dump. 我有一个奇怪的问题,我需要分析一个1.5GB大小的Java堆转储(来自IBM JRE),问题是在分析转储时(我已经尝试过HeapAnalyzerIBM Memory Analyzer 0.5 )这些工具耗尽内存我无法真正分析转储。 I have 3GB of RAM in my machine, but seems like it's not enough to analyze the 1.5 GB dump, 我的机器里有3GB的RAM,但似乎还不足以分析1.5 GB的转储,

My question is, do you know a specific tool for heap dump analysis (supporting IBM JRE dumps) that I could run with the amount of memory I have? 我的问题是,您是否知道我可以使用我拥有的内存量运行的堆转储分析(支持IBM JRE转储)的特定工具?

Thanks. 谢谢。

Try the SAP memory analyzer tool, which also has an eclipse plugin . 试试SAP内存分析器工具,它也有一个eclipse 插件 This tool creates index files on disk as it processes the dump file and requires much less memory than your other options. 此工具在处理转储文件时在磁盘上创建索引文件,并且所需内存比其他选项少得多。 I'm pretty sure it supports the newer IBM JRE's. 我很确定它支持更新的IBM JRE。 That being said - with a 1.5 GB dump file, you might have no other option but to run a 64-bit JVM to analyze this file - I usually estimate that a heap dump file of size n takes 5*n memory to open using standard tools, and 3*n memory to open using MAT, but your milage will vary depending on what the dump actually contains. 话虽如此 - 使用1.5 GB转储文件,您可能没有其他选择,只能运行64位JVM来分析此文件 - 我通常估计大小为n的堆转储文件需要使用标准打开5 * n内存工具,以及使用MAT打开的3 * n内存,但您的milage将根据转储实际包含的内容而有所不同。

It's going to difficult to analyze 1.5GB heap dump on a 3GB RAM. 在3GB RAM上分析1.5GB堆转储很困难。 Because in that 3GB your OS, other processes, services,... easily would occupy 0.5 GB. 因为3GB你的操作系统,其他进程,服务......很容易占用0.5 GB。 So you are left with only 2.5GB. 所以你只剩下2.5GB了。 heapHero tool is efficient in analyzing heap dumps. heapHero工具可以有效地分析堆转储。 It should take only 0.5GB more than the size of heap dump to analyze. 它应该只比堆转储的大小多0.5GB来分析。 You can give it try. 你可以尝试一下。 But best recommendation is to analyze heap dump on a machine which has adequate memory OR you can get an AWS ec2 instance just for the period of analyzing heap dumps. 但最好的建议是分析具有足够内存的计算机上的堆转储,或者只是在分析堆转储期间才能获得AWS ec2实例。 After analyzing heap dumps, you can terminate the instance. 分析堆转储后,您可以终止实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM