首页 > 其他分享 >JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具

时间:2022-10-05 21:43:20浏览次数:69  
标签:Min 0.0 回收 secs 垃圾 ms Diff 日志 Avg


文章目录

1.垃圾回收发生的时机

GC是由JVM自动完成的,根据JVM系统环境而定,所以时机是不确定的。
当然,我们可以手动进行垃圾回收, 比如调用System.gc()方法通知JVM进行一次垃圾回收,但是具体什么时刻运行也无法控制。
也就是说System.gc()只是通知要回收,什么时候回收由JVM决定。
因为对于垃圾回收来讲,JVM内部是如果一个队列似得去以此执行;手动加入的gc,只会依次放入队列中等待执行;

2.通过Parallel垃圾回收器收集

2.1.配置 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:gc.log

-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps
-Xloggc:gc.log

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_垃圾回收

2.2.启动项目

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_02

2.3.自动生成日志文件 gc.log

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_sed_03


gc.log

Java HotSpot(TM) 64-Bit Server VM (25.211-b12) for bsd-amd64 JRE (1.8.0_211-b12), built on Apr  1 2019 20:53:18 by "java_re" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Memory: 4k page, physical 8388608k(174040k free)

/proc/meminfo:

CommandLine flags: -XX:InitialHeapSize=134217728 -XX:MaxHeapSize=2147483648 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC
2020-03-14T08:32:26.220-0800: 0.884: [GC (Allocation Failure) [PSYoungGen: 33280K->3822K(38400K)] 33280K->3830K(125952K), 0.0043770 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2020-03-14T08:32:26.470-0800: 1.135: [GC (Allocation Failure) [PSYoungGen: 37102K->5028K(38400K)] 37110K->5044K(125952K), 0.0048521 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2020-03-14T08:32:26.710-0800: 1.374: [GC (Allocation Failure) [PSYoungGen: 38308K->5112K(38400K)] 38324K->5861K(125952K), 0.0074627 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]
2020-03-14T08:32:27.181-0800: 1.845: [GC (Allocation Failure) [PSYoungGen: 38392K->5096K(71680K)] 39141K->8255K(159232K), 0.0190034 secs] [Times: user=0.03 sys=0.01, real=0.02 secs]
2020-03-14T08:32:27.443-0800: 2.108: [GC (Metadata GC Threshold) [PSYoungGen: 23268K->5113K(71680K)] 26427K->9006K(159232K), 0.0071650 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2020-03-14T08:32:27.451-0800: 2.115: [Full GC (Metadata GC Threshold) [PSYoungGen: 5113K->0K(71680K)] [ParOldGen: 3893K->5659K(55808K)] 9006K->5659K(127488K), [Metaspace: 20664K->20664K(1067008K)], 0.0371110 secs] [Times: user=0.07 sys=0.01, real=0.03 secs]
2020-03-14T08:32:29.006-0800: 3.670: [GC (Allocation Failure) [PSYoungGen: 66560K->6982K(109056K)] 72219K->12649K(164864K), 0.0106451 secs] [Times: user=0.02 sys=0.01, real=0.01 secs]

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_04

备注说明

[GC (Allocation Failure) [PSYoungGen: 37102K->5028K(38400K)] 37110K->5044K(125952K)
[PSYoungGen: 37102K->5028K(38400K)]:Young区大小本来37102K,回收后变为5028K,38400K为Young区总的大小
37110K->5044K(125952K)这个是总的堆内存的大小,7可以认为5044K-5028K就是old区回收的大小

3.通过CMS垃圾回收器收集

3.1.配置

-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseConcMarkSweepGC -Xloggc:cms-gc.log

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_sed_05

3.2.运行启动项目,生成日志

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_06

3.3.分析日志 cms-gc.log

Java HotSpot(TM) 64-Bit Server VM (25.211-b12) for bsd-amd64 JRE (1.8.0_211-b12), built on Apr  1 2019 20:53:18 by "java_re" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Memory: 4k page, physical 8388608k(264660k free)

/proc/meminfo:

CommandLine flags: -XX:InitialHeapSize=134217728 -XX:MaxHeapSize=2147483648 -XX:MaxNewSize=348966912 -XX:MaxTenuringThreshold=6 -XX:OldPLABSize=16 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
2020-03-14T10:25:39.460-0800: 1.053: [GC (GCLocker Initiated GC) 2020-03-14T10:25:39.460-0800: 1.053: [ParNew: 34953K->3809K(39296K), 0.0051675 secs] 34953K->3809K(126720K), 0.0052943 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2020-03-14T10:25:39.725-0800: 1.317: [GC (Allocation Failure) 2020-03-14T10:25:39.725-0800: 1.317: [ParNew: 38753K->3955K(39296K), 0.0106454 secs] 38753K->5899K(126720K), 0.0107201 secs] [Times: user=0.03 sys=0.01, real=0.01 secs]
2020-03-14T10:25:39.997-0800: 1.590: [GC (Allocation Failure) 2020-03-14T10:25:39.997-0800: 1.590: [ParNew: 38899K->3445K(39296K), 0.0182829 secs] 40843K->6294K(126720K), 0.0183968 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
2020-03-14T10:25:40.522-0800: 2.115: [GC (Allocation Failure) 2020-03-14T10:25:40.522-0800: 2.115: [ParNew: 38395K->4351K(39296K), 0.0060979 secs] 41244K->8409K(126720K), 0.0062010 secs] [Times: user=0.02 sys=0.01, real=0.00 secs]
2020-03-14T10:25:40.529-0800: 2.121: [GC (GCLocker Initiated GC) 2020-03-14T10:25:40.529-0800: 2.121: [ParNew: 4765K->235K(39296K), 0.0074328 secs] 8822K->7931K(126720K), 0.0075261 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2020-03-14T10:25:41.082-0800: 2.675: [GC (Allocation Failure) 2020-03-14T10:25:41.082-0800: 2.675: [ParNew: 35179K->3399K(39296K), 0.0038822 secs] 42875K->11095K(126720K), 0.0039835 secs] [Times: user=0.02 sys=0.01, real=0.00 secs]
2020-03-14T10:25:41.087-0800: 2.679: [GC (CMS Initial Mark) [1 CMS-initial-mark: 7696K(87424K)] 11097K(126720K), 0.0008137 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2020-03-14T10:25:41.087-0800: 2.680: [CMS-concurrent-mark-start]
2020-03-14T10:25:41.119-0800: 2.711: [CMS-concurrent-mark: 0.031/0.031 secs] [Times: user=0.08 sys=0.01, real=0.03 secs]
2020-03-14T10:25:41.119-0800: 2.711: [CMS-concurrent-preclean-start]
2020-03-14T10:25:41.120-0800: 2.712: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2020-03-14T10:25:41.120-0800: 2.712: [CMS-concurrent-abortable-preclean-start]
2020-03-14T10:25:41.396-0800: 2.989: [CMS-concurrent-abortable-preclean: 0.108/0.276 secs] [Times: user=0.60 sys=0.02, real=0.27 secs]
2020-03-14T10:25:41.398-0800: 2.991: [GC (CMS Final Remark) [YG occupancy: 21379 K (39296 K)]2020-03-14T10:25:41.398-0800: 2.991: [Rescan (parallel) , 0.0033918 secs]2020-03-14T10:25:41.402-0800: 2.994: [weak refs processing, 0.0004793 secs]2020-03-14T10:25:41.402-0800: 2.995: [class unloading, 0.0062217 secs]2020-03-14T10:25:41.408-0800: 3.001: [scrub symbol table, 0.0102398 secs]2020-03-14T10:25:41.419-0800: 3.011: [scrub string table, 0.0003664 secs][1 CMS-remark: 7696K(87424K)] 29075K(126720K), 0.0215389 secs] [Times: user=0.04 sys=0.00, real=0.03 secs]
2020-03-14T10:25:41.420-0800: 3.012: [CMS-concurrent-sweep-start]
2020-03-14T10:25:41.423-0800: 3.015: [CMS-concurrent-sweep: 0.003/0.003 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2020-03-14T10:25:41.423-0800: 3.015: [CMS-concurrent-reset-start]
2020-03-14T10:25:41.426-0800: 3.018: [CMS-concurrent-reset: 0.003/0.003 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2020-03-14T10:25:41.884-0800: 3.476: [GC (Allocation Failure) 2020-03-14T10:25:41.884-0800: 3.476: [ParNew: 38343K->3951K(39296K), 0.0062215 secs] 42579K->9828K(126720K), 0.0063352 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2020-03-14T10:25:42.633-0800: 4.225: [GC (Allocation Failure) 2020-03-14T10:25:42.633-0800: 4.225: [ParNew: 38895K->4351K(39296K), 0.0058392 secs] 44772K->12144K(126720K), 0.0059428 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]
2020-03-14T10:25:43.338-0800: 4.931: [GC (Allocation Failure) 2020-03-14T10:25:43.338-0800: 4.931: [ParNew: 39295K->4352K(39296K), 0.0085009 secs] 47088K->14287K(126720K), 0.0085831 secs] [Times: user=0.03 sys=0.00, real=0.01 secs]

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_07

4.通过G1垃圾回收器收集

4.1.配置

-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseG1GC -Xloggc:g1-gc.log

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_sed_08

4.2.分析日志 g1-gc.log

Java HotSpot(TM) 64-Bit Server VM (25.211-b12) for bsd-amd64 JRE (1.8.0_211-b12), built on Apr  1 2019 20:53:18 by "java_re" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Memory: 4k page, physical 8388608k(528884k free)

/proc/meminfo:

CommandLine flags: -XX:InitialHeapSize=134217728 -XX:MaxHeapSize=2147483648 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
2020-03-14T10:39:06.633-0800: 0.638: [GC pause (G1 Evacuation Pause) (young), 0.0029785 secs]
[Parallel Time: 2.0 ms, GC Workers: 4]
[GC Worker Start (ms): Min: 638.5, Avg: 638.5, Max: 638.5, Diff: 0.0]
[Ext Root Scanning (ms): Min: 0.1, Avg: 0.5, Max: 0.9, Diff: 0.8, Sum: 2.1]
[Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Processed Buffers: Min: 0, Avg: 0.0, Max: 0, Diff: 0, Sum: 0]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.3, Max: 0.8, Diff: 0.8, Sum: 1.2]
[Object Copy (ms): Min: 0.6, Avg: 1.1, Max: 1.5, Diff: 0.9, Sum: 4.5]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 2.5, Max: 5, Diff: 4, Sum: 10]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[GC Worker Total (ms): Min: 1.9, Avg: 2.0, Max: 2.0, Diff: 0.0, Sum: 7.8]
[GC Worker End (ms): Min: 640.5, Avg: 640.5, Max: 640.5, Diff: 0.0]
[Code Root Fixup: 0.0 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.0 ms]
[Other: 0.9 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 0.7 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.0 ms]
[Eden: 14.0M(14.0M)->0.0B(22.0M) Survivors: 0.0B->2048.0K Heap: 14.0M(128.0M)->2194.5K(128.0M)]
[Times: user=0.01 sys=0.00, real=0.00 secs]
2020-03-14T10:39:06.909-0800: 0.914: [GC pause (G1 Evacuation Pause) (young), 0.0040966 secs]
[Parallel Time: 2.8 ms, GC Workers: 4]
[GC Worker Start (ms): Min: 913.6, Avg: 913.6, Max: 913.7, Diff: 0.1]
[Ext Root Scanning (ms): Min: 0.2, Avg: 0.7, Max: 1.6, Diff: 1.4, Sum: 2.8]
[Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[Processed Buffers: Min: 0, Avg: 0.2, Max: 1, Diff: 1, Sum: 1]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.2, Max: 0.6, Diff: 0.6, Sum: 0.6]
[Object Copy (ms): Min: 1.2, Avg: 1.8, Max: 2.4, Diff: 1.2, Sum: 7.4]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 2.0, Max: 3, Diff: 2, Sum: 8]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[GC Worker Total (ms): Min: 2.7, Avg: 2.7, Max: 2.8, Diff: 0.1, Sum: 11.0]
[GC Worker End (ms): Min: 916.4, Avg: 916.4, Max: 916.4, Diff: 0.0]
[Code Root Fixup: 0.0 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 1.2 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 1.0 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.1 ms]
[Eden: 22.0M(22.0M)->0.0B(73.0M) Survivors: 2048.0K->3072.0K Heap: 24.1M(128.0M)->4466.5K(128.0M)]
[Times: user=0.01 sys=0.00, real=0.01 secs]
2020-03-14T10:39:07.427-0800: 1.432: [GC pause (G1 Evacuation Pause) (young), 0.0108189 secs]
[Parallel Time: 6.9 ms, GC Workers: 4]
[GC Worker Start (ms): Min: 1432.5, Avg: 1433.2, Max: 1434.3, Diff: 1.8]
[Ext Root Scanning (ms): Min: 0.0, Avg: 0.7, Max: 1.6, Diff: 1.6, Sum: 3.0]
[Update RS (ms): Min: 0.0, Avg: 0.2, Max: 0.3, Diff: 0.3, Sum: 0.6]
[Processed Buffers: Min: 0, Avg: 0.8, Max: 1, Diff: 1, Sum: 3]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.6, Max: 1.1, Diff: 1.1, Sum: 2.3]
[Object Copy (ms): Min: 4.5, Avg: 4.6, Max: 4.8, Diff: 0.3, Sum: 18.5]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 3.0, Max: 6, Diff: 5, Sum: 12]
[GC Worker Other (ms): Min: 0.0, Avg: 0.1, Max: 0.3, Diff: 0.3, Sum: 0.3]
[GC Worker Total (ms): Min: 5.1, Avg: 6.2, Max: 6.9, Diff: 1.8, Sum: 24.8]
[GC Worker End (ms): Min: 1439.4, Avg: 1439.4, Max: 1439.4, Diff: 0.0]
[Code Root Fixup: 0.0 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 3.8 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 3.6 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.1 ms]
[Eden: 73.0M(73.0M)->0.0B(66.0M) Survivors: 3072.0K->10.0M Heap: 77.4M(128.0M)->10.9M(128.0M)]
[Times: user=0.03 sys=0.00, real=0.01 secs]
2020-03-14T10:39:07.849-0800: 1.854: [GC pause (Metadata GC Threshold) (young) (initial-mark), 0.0070399 secs]
[Parallel Time: 5.4 ms, GC Workers: 4]
[GC Worker Start (ms): Min: 1854.2, Avg: 1854.2, Max: 1854.2, Diff: 0.1]
[Ext Root Scanning (ms): Min: 1.0, Avg: 1.2, Max: 1.3, Diff: 0.3, Sum: 4.7]
[Update RS (ms): Min: 0.0, Avg: 0.1, Max: 0.1, Diff: 0.1, Sum: 0.2]
[Processed Buffers: Min: 0, Avg: 0.8, Max: 1, Diff: 1, Sum: 3]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.3, Max: 0.6, Diff: 0.6, Sum: 1.3]
[Object Copy (ms): Min: 3.4, Avg: 3.7, Max: 3.9, Diff: 0.5, Sum: 14.7]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 4.0, Max: 6, Diff: 5, Sum: 16]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[GC Worker Total (ms): Min: 5.2, Avg: 5.3, Max: 5.3, Diff: 0.1, Sum: 21.0]
[GC Worker End (ms): Min: 1859.4, Avg: 1859.4, Max: 1859.4, Diff: 0.0]
[Code Root Fixup: 0.0 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 1.6 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 1.4 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.1 ms]
[Eden: 38.0M(66.0M)->0.0B(67.0M) Survivors: 10.0M->9216.0K Heap: 48.4M(128.0M)->10098.5K(128.0M)]
[Times: user=0.02 sys=0.00, real=0.01 secs]
2020-03-14T10:39:07.856-0800: 1.861: [GC concurrent-root-region-scan-start]
2020-03-14T10:39:07.863-0800: 1.868: [GC concurrent-root-region-scan-end, 0.0062933 secs]
2020-03-14T10:39:07.863-0800: 1.868: [GC concurrent-mark-start]
2020-03-14T10:39:07.863-0800: 1.868: [GC concurrent-mark-end, 0.0001106 secs]
2020-03-14T10:39:07.863-0800: 1.868: [GC remark 2020-03-14T10:39:07.863-0800: 1.868: [Finalize Marking, 0.0005940 secs] 2020-03-14T10:39:07.863-0800: 1.868: [GC ref-proc, 0.0006483 secs] 2020-03-14T10:39:07.864-0800: 1.869: [Unloading, 0.0024678 secs], 0.0038459 secs]
[Times: user=0.01 sys=0.00, real=0.00 secs]
2020-03-14T10:39:07.867-0800: 1.872: [GC cleanup 10M->9727K(128M), 0.0002397 secs]
[Times: user=0.00 sys=0.00, real=0.00 secs]
2020-03-14T10:39:07.867-0800: 1.872: [GC concurrent-cleanup-start]
2020-03-14T10:39:07.867-0800: 1.872: [GC concurrent-cleanup-end, 0.0000109 secs]
2020-03-14T10:39:09.275-0800: 3.280: [GC pause (G1 Evacuation Pause) (young), 0.0166726 secs]
[Parallel Time: 11.1 ms, GC Workers: 4]
[GC Worker Start (ms): Min: 3280.4, Avg: 3280.9, Max: 3282.3, Diff: 2.0]
[Ext Root Scanning (ms): Min: 0.0, Avg: 1.2, Max: 2.3, Diff: 2.3, Sum: 4.9]
[Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Processed Buffers: Min: 0, Avg: 0.8, Max: 3, Diff: 3, Sum: 3]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 1.2, Max: 2.8, Diff: 2.8, Sum: 5.0]
[Object Copy (ms): Min: 6.1, Avg: 7.9, Max: 9.4, Diff: 3.3, Sum: 31.6]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.1, Diff: 0.1, Sum: 0.1]
[Termination Attempts: Min: 1, Avg: 3.2, Max: 8, Diff: 7, Sum: 13]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[GC Worker Total (ms): Min: 9.0, Avg: 10.4, Max: 11.0, Diff: 2.0, Sum: 41.6]
[GC Worker End (ms): Min: 3291.3, Avg: 3291.3, Max: 3291.4, Diff: 0.1]
[Code Root Fixup: 0.1 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 5.4 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 5.0 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.3 ms]
[Eden: 67.0M(67.0M)->0.0B(66.0M) Survivors: 9216.0K->10.0M Heap: 75.5M(128.0M)->11.4M(128.0M)]
[Times: user=0.04 sys=0.00, real=0.02 secs]
2020-03-14T10:39:10.435-0800: 4.440: [GC pause (G1 Evacuation Pause) (young), 0.0170093 secs]
[Parallel Time: 13.4 ms, GC Workers: 4]
[GC Worker Start (ms): Min: 4439.9, Avg: 4439.9, Max: 4440.0, Diff: 0.0]
[Ext Root Scanning (ms): Min: 0.4, Avg: 1.1, Max: 2.7, Diff: 2.3, Sum: 4.3]
[Update RS (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 0.2]
[Processed Buffers: Min: 0, Avg: 0.5, Max: 1, Diff: 1, Sum: 2]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[Code Root Scanning (ms): Min: 0.0, Avg: 1.7, Max: 3.7, Diff: 3.7, Sum: 6.7]
[Object Copy (ms): Min: 9.2, Avg: 10.6, Max: 11.6, Diff: 2.5, Sum: 42.3]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 2.0, Max: 3, Diff: 2, Sum: 8]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[GC Worker Total (ms): Min: 13.4, Avg: 13.4, Max: 13.4, Diff: 0.0, Sum: 53.6]
[GC Worker End (ms): Min: 4453.3, Avg: 4453.3, Max: 4453.3, Diff: 0.0]
[Code Root Fixup: 0.1 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 3.4 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 2.9 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.3 ms]
[Eden: 66.0M(66.0M)->0.0B(66.0M) Survivors: 10.0M->10.0M Heap: 77.4M(128.0M)->16.4M(128.0M)]
[Times: user=0.06 sys=0.01, real=0.02 secs]

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_垃圾回收_09

这里注意下,G1回收的也有可能是mixed类型的,因为old区和young区的gc,g1收集器都可以进行回收

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_垃圾回收_10

4.2.1.具体分析上面图示的步骤

2020-03-14T10:39:06.633-0800: 0.638: [GC pause (G1 Evacuation Pause) (young), 0.0029785 secs]
[Parallel Time: 2.0 ms, GC Workers: 4] #并行执行四个线程,共计消耗2ms
[GC Worker Start (ms): Min: 638.5, Avg: 638.5, Max: 638.5, Diff: 0.0] #四个线程
[Ext Root Scanning (ms): Min: 0.1, Avg: 0.5, Max: 0.9, Diff: 0.8, Sum: 2.1]
[Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Processed Buffers: Min: 0, Avg: 0.0, Max: 0, Diff: 0, Sum: 0]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.3, Max: 0.8, Diff: 0.8, Sum: 1.2]
[Object Copy (ms): Min: 0.6, Avg: 1.1, Max: 1.5, Diff: 0.9, Sum: 4.5]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 2.5, Max: 5, Diff: 4, Sum: 10]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[GC Worker Total (ms): Min: 1.9, Avg: 2.0, Max: 2.0, Diff: 0.0, Sum: 7.8]
[GC Worker End (ms): Min: 640.5, Avg: 640.5, Max: 640.5, Diff: 0.0]
[Code Root Fixup: 0.0 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.0 ms]
[Other: 0.9 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 0.7 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.0 ms]
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.0 ms]
[Eden: 14.0M(14.0M)->0.0B(22.0M) Survivors: 0.0B->2048.0K Heap: 14.0M(128.0M)->2194.5K(128.0M)]
[Times: user=0.01 sys=0.00, real=0.00 secs]

4.2.2.关于参数的说明,大家可以参考下面的地址

​https://blogs.oracle.com/poonam/understanding-g1-gc-logs​

6.GC垃圾回收日志分析-界面工具

6.0.下载地址

6.1.GCViewer

​https://gceasy.io/​

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_sed_11

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_sed_12

6.2.在线工具 gceasy

6.2.1.官网

https://gceasy.io/

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_13


JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_14

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_sed_15


JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_垃圾回收_16

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_垃圾回收_17

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_18

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_垃圾回收_19

JVM之垃圾回收日志分析以及常用垃圾回收日志分析的界面工具_java_20

6.2.2.使用介绍


标签:Min,0.0,回收,secs,垃圾,ms,Diff,日志,Avg
From: https://blog.51cto.com/u_11812624/5732900

相关文章

  • JVM 垃圾回收器如何选择
    明确垃圾回收器组合-XX:+UseSerialGC年轻代和老年代都用串行收集器-XX:+UseParNewGC年轻代使用ParNew,老年代使用SerialOld-XX:+UseParallelGC年轻代使用ParallerSca......
  • k8s使用Sidecar方式采集日志
    1、创建configmapvimlogstash-cm.yamlapiVersion:v1kind:ConfigMapmetadata:name:logstashconf-consulnamespace:fat-sdata:logstash.conf:|-in......
  • 引擎之旅 Chapter.4 日志系统
    关于近段时间为何没有更新的解释:Findanewjob.目录引言日志语句的分类控制台窗体和VSOutputTab的日志打印存储至特定的文件中展示堆栈信息引言一般来说,一个优质......
  • 基于Kafka+ELK搭建海量日志平台
    早在传统的单体应用时代,查看日志大都通过SSH客户端登服务器去看,使用较多的命令就是less或者tail。如果服务部署了好几台,就要分别登录到这几台机器上看,等到了分布式和微服......
  • R语言观察日志(part26)--去除重复行
    学习笔记,仅供参考,有错必纠准备df<-data.frame(grade=c("A","A","A","B","B","C"),a=c(1:6),b=c(6:1),......
  • 本周回顾:列表、字典、集合、元祖、垃圾回收机制、循环、输出格式
    本周回顾重点大概列表字典集合元祖垃圾回收机制循环输出格式目录本周回顾重点大概本周回顾详细列表字典集合元祖垃圾回收机制循环and分支结构本周回顾详细列表......
  • 0889-7.1.7-Hive on Tez解析以及日志分析
    1.Tez简介Tez是支持DAG作业的开源计算框架,它可以将多个有依赖的作业转换为一个作业从而大幅提升DAG作业的性能。从本质上讲,Tez组成非常简单,只有两个组成部分:数据处理......
  • 如何指定Hadoop命令行日志输出级别
    温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。Fayson的github:​​https://github.com/fayson/cdhproject​​提示:代码块部分可......
  • 如何在NET 6.0使用结构化的日志系统
             在我们的系统里面,有一项技术是必须使用的,那就是日志记录。我们在调试系统或者跟踪系统运行情况,都可以通过日志了解具体的情况。在项目开发中,我们有可......
  • SQL Server 日志清理SQL
    USE[master]GOALTERDATABASE要清理的数据库名称SETRECOVERYSIMPLEWITHNO_WAITGOALTERDATABASE要清理的数据库名称SETRECOVERYSIMPLE-......