第十二讲JVM的GC日志Full GC每个字段详解
[Full GC
(Ergonomics) [PSYoungGen: 654K->397K(2048K)] [ParOldGen:
7152K->7152K(7168K)] 7807K->7549K(9216K), [Metaspace:
2616K->2616K(1056768K)], 0.0863497 secs] [Times: user=0.23
sys=0.00, real=0.09 secs]
[Full GC
(Allocation Failure) [PSYoungGen: 397K->397K(2048K)] [ParOldGen:
7152K->7152K(7168K)] 7549K->7549K(9216K), [Metaspace:
2616K->2616K(1056768K)], 0.0868203 secs] [Times: user=0.25
sys=0.02, real=0.09 secs]
Exception in thread "main"
java.lang.OutOfMemoryError: Java heap space
at
java.util.Arrays.copyOf(Unknown Source)
at
java.util.Arrays.copyOf(Unknown Source)
at
java.util.ArrayList.grow(Unknown Source)
at
java.util.ArrayList.ensureExplicitCapacity(Unknown
Source)
at
java.util.ArrayList.ensureCapacityInternal(Unknown
Source)
at
java.util.ArrayList.add(Unknown Source)
at
com.dt.spark.jvm.basics.HelloHeapOutOfMemory.main(HelloHeapOutOfMemory.java:15)
Heap
PSYoungGen total 2048K, used 431K [0x00000000ffd00000, 0x0000000100000000,
0x0000000100000000)
eden space 1024K, 42% used
[0x00000000ffd00000,0x00000000ffd6bdf0,0x00000000ffe00000)
from space 1024K, 0% used
[0x00000000ffe00000,0x00000000ffe00000,0x00000000fff00000)
to space 1024K, 0% used
[0x00000000fff00000,0x00000000fff00000,0x0000000100000000)
ParOldGen total 7168K, used 7152K [0x00000000ff600000, 0x00000000ffd00000,
0x00000000ffd00000)
object space 7168K, 99% used
[0x00000000ff600000,0x00000000ffcfc3c8,0x00000000ffd00000)
Metaspace used 2646K, capacity 4486K, committed 4864K, reserved
1056768K
class
space used
289K, capacity 386K, committed 512K, reserved 1048576K
Full GC
(Ergonomics) [PSYoungGen: 654K->397K(2048K)] [ParOldGen:
7152K->7152K(7168K)] 7807K->7549K(9216K),
[Metaspace: 2616K->2616K(1056768K)], 0.0863497 secs] [Times:
user=0.23 sys=0.00, real=0.09 secs]
新生代区,GC之前是654K,GC之后397K。新生代总的大小2048K。
年老代区,GC之前是7152K,GC之后7152K,总的大小7168K。
7807K->7549K(9216K) 整个Heap区
GC前7807K,GC后7549K,整个Heap大小9216K。
[Metaspace: 2616K->2616K(1056768K)], 0.0863497
secs] [Times: user=0.23 sys=0.00, real=0.09 secs]
Metaspace,其空间是非常大的,GC的前后大小并没有变。