java GC日志该怎么看?
天蓬老师
天蓬老师 2017-04-18 10:48:19
0
3
838
{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日志

天蓬老师
天蓬老师

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

全部回覆(3)
巴扎黑

可以看看深入理解java虛擬機器...裡面有講解..

大家讲道理

如何查看jvm 的gc 日誌,雖然有點老了,但很有借鏡意義 http://www.inter12.org/archiv...

巴扎黑

1、數字「11.569:」代表了GC發生的時間,這個數字的意思是從Java虛擬機啟動以來經過的秒數。
2、[ParNew表示GC發生的區域,這裡的顯示跟GC收集器類型有關,這裡表示用ParNew收集器
3、859714K->96106K(917504K), 0.0484250 secs,表示GC前該內存區域已經使用的容量-->GC後該記憶體區域使用容量(該記憶體區域總容量)
4、859714K->96106K(1966080K), 0.0486090 secs,表示GC前java堆已使用容量-->GC後java堆已使用容量(Java堆總容量),此記憶體區域GC所佔用的時間。
5、[Times: user=0.19 sys=0.00, real=0.05 secs]表示程式耗時、系統耗時、實際耗時。這裡user的時間超過real的時間,這是正常的,表示是多執行緒進行CPU切換,疊加了多執行緒的時間。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!