简体   繁体   English

如果我将最大堆大小设置为2 Gb,那么堆转储大小将是多少?

[英]What will be the heapdump size if I set the Max Heap size = 2 Gb?

I have set my max heap size to 2 GB on my Websphere server console. 我在Websphere服务器控制台上将最大堆大小设置为2 GB。 I want to know what will be size of my heapdump files created during Out of Memory errors. 我想知道在“内存不足”错误期间创建的heapdump文件的大小。 Will they be greater than 2GB or equal to 2GB or less than 2GB? 它们是否大于2GB或等于2GB或小于2GB?

It depends on the type of the dump. 这取决于转储的类型。 Accordingly with the article provided by IBM: 因此,根据IBM提供的文章:

1) PHD dump takes about 20 percent of Java heap size 1)PHD转储占用Java堆大小的大约20%

2) HPROF dump takes about the same as Java heap size 2)HPROF转储与Java堆大小大致相同

3) IBM system dumps - about Java heap size + 30 percent 3)IBM系统转储-大约Java堆大小+ 30%

Source: https://www.ibm.com/developerworks/library/j-memoryanalyzer/ 资料来源: https : //www.ibm.com/developerworks/library/j-memoryanalyzer/

Normally you will get PHD with Javacore on OutOfMemoryError, so you can expect it to be about 20% of heap. 通常,您将在OutOfMemoryError上获得带有Javacore的PHD,因此可以预期它约为堆的20%。 But you have to keep in mind that OutOfMemoryError could be thrown several times within rather short timeframe, so several dumps could be created. 但是您必须记住,OutOfMemoryError可能会在相当短的时间内抛出多次,因此可能会创建多个转储。

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

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