java GC日志该怎么看?
天蓬老师
天蓬老师 2017-04-18 10:48:19
0
3
890
{Heap before GC invocations=70426 (full 39):
 par new generation   total 917504K, used 849770K [0x0000000730000000, 0x0000000770000000, 0x0000000770000000)
  eden space 786432K, 100% used [0x0000000730000000, 0x0000000760000000, 0x0000000760000000)
  from space 131072K,  48% used [0x0000000760000000, 0x0000000763dda9d8, 0x0000000768000000)
  to   space 131072K,   0% used [0x0000000768000000, 0x0000000768000000, 0x0000000770000000)
 concurrent mark-sweep generation total 1050496K, used 735717K [0x0000000770000000, 0x00000007b01e0000, 0x00000007f0000000)
 concurrent-mark-sweep perm gen total 262144K, used 44072K [0x00000007f0000000, 0x0000000800000000, 0x0000000800000000)
2017-03-11T17:52:34.524+0800: 86930.373: [GC2017-03-11T17:52:34.524+0800: 86930.373: [ParNew
Desired survivor size 67108864 bytes, new threshold 15 (max 15)
- age   1:    7498968 bytes,    7498968 total
- age   2:   10419016 bytes,   17917984 total
- age   3:    9045656 bytes,   26963640 total
- age   4:    3149912 bytes,   30113552 total
- age   5:    1557968 bytes,   31671520 total
- age   6:    1181200 bytes,   32852720 total
- age   7:     900696 bytes,   33753416 total
- age   8:    1135200 bytes,   34888616 total
- age   9:    1545448 bytes,   36434064 total
- age  10:    1038000 bytes,   37472064 total
- age  11:    1199288 bytes,   38671352 total
- age  12:     840296 bytes,   39511648 total
- age  13:    1264520 bytes,   40776168 total
- age  14:    1005752 bytes,   41781920 total
- age  15:    1008152 bytes,   42790072 total
: 849770K->62511K(917504K), 0.0296150 secs] 1585488K->798923K(1968000K), 0.0299000 secs] [Times: user=0.11 sys=0.00, real=0.03 secs]
Heap after GC invocations=70427 (full 39):
 par new generation   total 917504K, used 62511K [0x0000000730000000, 0x0000000770000000, 0x0000000770000000)
  eden space 786432K,   0% used [0x0000000730000000, 0x0000000730000000, 0x0000000760000000)
  from space 131072K,  47% used [0x0000000768000000, 0x000000076bd0bf30, 0x0000000770000000)
  to   space 131072K,   0% used [0x0000000760000000, 0x0000000760000000, 0x0000000768000000)
 concurrent mark-sweep generation total 1050496K, used 736411K [0x0000000770000000, 0x00000007b01e0000, 0x00000007f0000000)
 concurrent-mark-sweep perm gen total 262144K, used 44072K [0x00000007f0000000, 0x0000000800000000, 0x0000000800000000)
}

上面是我的一个GC日志,我想问这种日志该怎么看呢?之前只是学过一些理论的东西,头一次接触真正的GC日志

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
巴扎黑

You can take a look at Deep Understanding of Java Virtual Machine... There are explanations inside..

大家讲道理

How to view the gc log of jvm, although it is a bit old, but it is very useful for reference http://www.inter12.org/archiv...

巴扎黑

1. The number "11.569:" represents the time when GC occurs. The meaning of this number is the number of seconds that have passed since the Java virtual machine was started.
2. [ParNew represents the area where GC occurs. The display here is related to the GC collector type. Here it means using the ParNew collector.
3. 859714K->96106K (917504K), 0.0484250 secs, which means that the memory area has been used before GC. Capacity -->Used capacity of the memory area after GC (total capacity of the memory area)
4, 859714K->96106K (1966080K), 0.0486090 secs, indicating the used capacity of the java heap before GC -->java after GC The used capacity of the heap (the total capacity of the Java heap), the time taken by GC in this memory area.
5. [Times: user=0.19 sys=0.00, real=0.05 secs] means program time-consuming, system time-consuming, and actual time-consuming. Here the user time exceeds the real time, which is normal. It means that multi-threads are performing CPU switching, and the multi-thread time is superimposed.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template