GC 日志解读

2019-03-08  本文已影响0人  风吟空城

JVM参数配置

-XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=15 -Xms40M -Xmx40M -Xmn20M

新生代

GC日志

JDK 1.6

堆描述

[GC [DefNew: 9031K->633K(18432K), 0.0026813 secs] 9031K->663K(38912K), 0.0027457 secs ]
[Times: user=0.00 sys=0.00, real=0.00 secs]

heap
def new generation total 18432K, used 9183K [0x241e0000, ...)
  eden space 16438K, 52% used [...)
  from space 2048K,  32% used [...)
  to   space 2048K,  0% used [...)

tenured generation total 20480K, used 0K [...)
  the space 20480K, 0% used [...)

compacting perm gen total 12288K, used 362K [...)
  the space 12288K, 2% used [...)
    ro space 8192K, 67% used [...)
    rw space 12288K, 53% used [...)

按照从前到后的顺序,依次解释:

名称 描述
DefNew 表示新生代
9031K 表示新生代垃圾回收前大小
633K 表示新生代垃圾回收后大小
18432K 表示新生代大小
0.0026813 secs 表示新生代回收耗费时间
9031K 表示堆回收前大小
663K 表示堆回收后大小
38912K 表示大小
0.0027457 secs 表示堆回收耗费时间
ro space 表示只读空间,ro read only
rw space 表示读写空间,rw read write

JDK 1.7

堆描述

Heap
 PSYoungGen      total 18432K, used 7791K [0x00000000fec00000, 0x0000000100000000, 0x0000000100000000)
  eden space 16384K, 47% used [0x00000000fec00000,0x00000000ff39bd78,0x00000000ffc00000)
  from space 2048K, 0% used [0x00000000ffe00000,0x00000000ffe00000,0x0000000100000000)
  to   space 2048K, 0% used [0x00000000ffc00000,0x00000000ffc00000,0x00000000ffe00000)

 ParOldGen       total 20480K, used 0K [0x00000000fd800000, 0x00000000fec00000, 0x00000000fec00000)
  object space 20480K, 0% used [0x00000000fd800000,0x00000000fd800000,0x00000000fec00000)

 PSPermGen       total 21504K, used 2584K [0x00000000f8600000, 0x00000000f9b00000, 0x00000000fd800000)
  object space 21504K, 12% used [0x00000000f8600000,0x00000000f8886080,0x00000000f9b00000)

按照从前到后的顺序,依次解释:

名称 描述
PSYoungGen 新生代
18432K 新生代大小
7791K 新生代使用空间大小
eden space 伊甸园
16384K 表示伊甸园空间大小
47% 表示伊甸园使用空间大小
... ...
object space 表示对象空间
21504K 对象空间大小
12% used 对象空间使用大小
上一篇 下一篇

猜你喜欢

热点阅读