java GC日志該怎么看?
問題描述
{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: [ParNewDesired 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日志
問題解答
回答1:可以看看深入理解java虛擬機... 里面有講解..
回答2:如何查看jvm 的gc 日志,雖然有點老了,但是很有借鑒意義 http://www.inter12.org/archiv...
回答3:1、數(shù)字“11.569:”代表了GC發(fā)生的時間,這個數(shù)字的含義是從Java虛擬機啟動以來經(jīng)過的秒數(shù)。2、[ParNew表示GC發(fā)生的區(qū)域,這里的顯示跟GC收集器類型有關(guān),這里表示用ParNew收集器3、859714K->96106K(917504K), 0.0484250 secs,表示GC前該內(nèi)存區(qū)域已經(jīng)使用的容量-->GC后該內(nèi)存區(qū)域使用容量(該內(nèi)存區(qū)域總?cè)萘?4、859714K->96106K(1966080K), 0.0486090 secs,表示GC前java堆已使用容量-->GC后java堆已使用容量(Java堆總?cè)萘?,該內(nèi)存區(qū)域GC所占用的時間。5、[Times: user=0.19 sys=0.00, real=0.05 secs]表示程序耗時、系統(tǒng)耗時、實際耗時。這里user的時間超過real的時間,這是正常的,表示是多線程進行CPU切換,疊加了多線程的時間。
相關(guān)文章:
1. [python2]local variable referenced before assignment問題2. 求救一下,用新版的phpstudy,數(shù)據(jù)庫過段時間會消失是什么情況?3. mysql - 如何在有自增id的情況下,讓其他某些字段能不重復插入4. python小白,關(guān)于函數(shù)問題5. django - Python error: [Errno 99] Cannot assign requested address6. angular.js - 百度支持_escaped_fragment_嗎?7. java - 線上應用,如果數(shù)據(jù)庫操作失敗的話應該如何處理?8. node.js - win 下 npm install 遇到了如下錯誤 會導致 無法 run dev么?9. python小白 關(guān)于類里面的方法獲取變量失敗的問題10. Python2中code.co_kwonlyargcount的等效寫法
