什么是“紧致烫发素"?值代表什么? [英] What do the "compacting perm gen" values represent?
问题描述
我正在调查我们的一个生产系统上的JVM崩溃,下面的hs_err_pid日志文件片段中的以下内存值代表什么?
I'm investigating a JVM crash on one of our production systems, what do the following memory values represent in the hs_err_pid log file snippet below?
Heap
par new generation total 1258624K, used 955445K [0x00000005c0000000, 0x00000006155b0000, 0x000000066aaa0000)
eden space 1118784K, 73% used [0x00000005c0000000, 0x00000005f1e52598, 0x0000000604490000)
from space 139840K, 98% used [0x000000060cd20000, 0x00000006153db100, 0x00000006155b0000)
to space 139840K, 0% used [0x0000000604490000, 0x0000000604490000, 0x000000060cd20000)
tenured generation total 2796224K, used 1745107K [0x000000066aaa0000, 0x0000000715550000, 0x00000007c0000000)
the space 2796224K, 62% used [0x000000066aaa0000, 0x00000006d52d4d90, 0x00000006c2e0c400, 0x0000000715550000)
compacting perm gen total 482944K, used 482943K [0x00000007c0000000, 0x00000007dd7a0000, 0x0000000800000000)
the space 482944K, 99% used [0x00000007c0000000, 0x00000007dd79fff0, 0x00000007dd7a0000, 0x00000007dd7a0000)
No shared spaces configured.
我关心的是紧凑型烫发粉"的用法:这是否意味着已使用的最大已分配烫发粉堆的百分比或最大堆使用的百分比,还是其他?提供的百分比似乎是已使用/总计的除法,这是分配的总烫发量吗?由于我们的-XX:MaxPermSize
设置为1GB ...
My concern is with the "compacted perm gen" usage: does it mean percentage used of maximum allocated perm gen heap, or percentage used of maximum heap, or something else? The percentage provided appears to be a division of the used/total, is this the total allocated perm gen? Since our -XX:MaxPermSize
is set to 1GB...
是否有任何有用的资源(除了 Oracle白皮书(其中没有提及hs_err文件)来解释在JVM崩溃时转储的数据?
Are there any useful resources (other than the Oracle whitepaper, which does not mention hs_err files) to interpret the data dumped on a JVM crash?
推荐答案
我从未找到能准确描述"comping perm gen"值的参考,但我们自己的调查证明所报告的值为:
I never found a reference that accurately described the "compacting perm gen" values, but our own investigation proved that the reported values were:
当前使用的PermGen/当前分配的PermGen
currently used PermGen / currently allocated PermGen
在我所提问的示例中,这意味着已经为PermGen分配了482944K的内存,而在GC时已使用了其中的482943K(99%).我们将PermGen的最大大小设置为1048576K(1GB),因此收集过程中有大量预留资源可以重新分配.
In the example in my question, this meant that 482944K of memory had already been allocated for PermGen and 482943K of it had been used at the point of GC (99%). Our max PermGen size was set to 1048576K (1GB), so the collection process had plenty of reserved resources to re-allocate with.
对于那些遇到类似问题的人-我们最终解决了我们的问题.在我们的案例中,事实证明这是一个使用 sun.misc.Unsafe 类,它是使用不当会导致不安全" .
For those encountering similar issues - we solved our problem in the end. In our case it turned out to be a third-party library that made use of the sun.misc.Unsafe class, which is notoriously "unsafe" when used incorrectly.
In this case, a piece of logic for cloning objects passed a specific ClassLoader to some sun.misc.Unsafe operations to copy objects. On certain machines, the copied objects were regularly being created in a corrupted state. When the JVM attempted to garbage collect, it would eventually harvest one of these bad objects and crash. This always caused the error described in my question.
这篇关于什么是“紧致烫发素"?值代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!