java虚拟机(十一)--GC日志分析

时间:2021-04-22 22:53:24

GC相关:java虚拟机(六)--垃圾收集器和内存分配策略  java虚拟机(五)--垃圾回收机制GC

打印日志相关参数:

-XX:+PrintGCDetails

-XX:PrintGCTimestamps

-XX:PrintGCDateStamps

-Xloggc:$CATALINA_HOME/logs/gc.log

-XX:+PrintHeapAtGC

-XX:+PrintTenuringDistriution:发生GC的时候,把Young区中对象的年龄打印出来

其余的参数应该能直接看懂的,就不解释了。

PS:日志中加的注释下一行会错位,请自行注意。

Parallel日志:

默认情况下,都是使用Parallel收集器

JAVA_OPTS="-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:$CATALINA_HOME/logs/gc.log"

打开gc.log文件:

#虚拟机版本、jdk版本、Linux内核等
Java HotSpot(TM) 64-Bit Server VM (25.102-b14) for linux-amd64 JRE (1.8.0_102-b14), built on Jun 22 2016 18:43:17 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)
#磁盘数据每页4K,内存4G,1.7G属于空闲
Memory: 4k page, physical 3880412k(1678252k free), swap 0k(0k free)
#打印命令:因为Parallel是自适应的,虽然没有设置一些参数,但是根据服务器的内存、CPU等情况就行分配。
CommandLine flags: -XX:InitialHeapSize=62086592 -XX:MaxHeapSize=993385472 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC
#对象分配内存失败,Young区发生GC,从15M-->2M,总17M,堆从15M-->4M,总58M,GC时间0.0074512s,Young区减少13M,堆只减少了11M,所以有2M对象到了Old区
2019-07-15T10:38:52.441+0800: 0.654: [GC (Allocation Failure) [PSYoungGen: 15360K->2544K(17920K)] 15360K->4022K(58880K), 0.0074512 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T10:38:52.942+0800: 1.155: [GC (Allocation Failure) [PSYoungGen: 17904K->2554K(33280K)] 19382K->7383K(74240K), 0.0171215 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
2019-07-15T10:38:53.359+0800: 1.572: [GC (Allocation Failure) [PSYoungGen: 33274K->2554K(33280K)] 38103K->11504K(74240K), 0.0143284 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2019-07-15T10:38:53.500+0800: 1.713: [GC (Allocation Failure) [PSYoungGen: 33274K->2554K(64000K)] 42224K->14443K(104960K), 0.0129043 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2019-07-15T10:38:53.788+0800: 2.000: [GC (Allocation Failure) [PSYoungGen: 63994K->2554K(64000K)] 75883K->23497K(104960K), 0.0179449 secs] [Times: user=0.03 sys=0.01, real=0.02 secs]
2019-07-15T10:38:54.041+0800: 2.253: [GC (Allocation Failure) [PSYoungGen: 63994K->11256K(131584K)] 84937K->33580K(172544K), 0.0177155 secs] [Times: user=0.02 sys=0.01, real=0.02 secs]
2019-07-15T10:38:54.500+0800: 2.713: [GC (Allocation Failure) [PSYoungGen: 131576K->13815K(134144K)] 153900K->43739K(175104K), 0.0276207 secs] [Times: user=0.03 sys=0.02, real=0.03 secs]
#Metaspace区发生GC,Young区发生GC,从115M-->10M,总258M,堆从145M-->40M,总299M,GC时间0.0227380
2019-07-15T10:38:55.513+0800: 3.726: [GC (Metadata GC Threshold) [PSYoungGen: 115110K->10443K(258560K)] 145034K->40823K(299520K), 0.0227380 secs] [Times: user=0.04 sys=0.00, real=0.02 secs]
#发生Full GC,因为Metaspace内存利用达到阀值,Old区也被回收了
2019-07-15T10:38:55.536+0800: 3.748: [Full GC (Metadata GC Threshold) [PSYoungGen: 10443K->0K(258560K)] [ParOldGen: 30380K->28896K(59392K)] 40823K->28896K(317952K), [Metaspace: 20720K->20720K(1069056K)], 0.0819349 secs] [Times: user=0.14 sys=0.00, real=0.09 secs]
2019-07-15T10:38:58.060+0800: 6.272: [GC (Allocation Failure) [PSYoungGen: 240640K->15826K(259584K)] 269536K->44730K(318976K), 0.0444735 secs] [Times: user=0.08 sys=0.01, real=0.04 secs]
2019-07-15T10:38:58.842+0800: 7.054: [GC (Metadata GC Threshold) [PSYoungGen: 113863K->8488K(303616K)] 142768K->37401K(363008K), 0.0197353 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
2019-07-15T10:38:58.861+0800: 7.074: [Full GC (Metadata GC Threshold) [PSYoungGen: 8488K->0K(303616K)] [ParOldGen: 28912K->15427K(55296K)] 37401K->15427K(358912K), [Metaspace: 33955K->33955K(1081344K)], 0.1084317 secs] [Times: user=0.19 sys=0.00, real=0.11 secs]
 

-XX:+UseCompressedClassPointers使用CCS短指针

-XX:+UseCompressedOops:压缩对象指针

-XX:+UseParallelGC:默认使用Parallel垃圾收集器,Server模式下

[Times: user=0.02 sys=0.00, real=0.01 secs] :分别代表用户态消耗的CPU时间、内核态消耗的CPU时间、操作从开始到结束经过的墙钟事件

CPU时间和墙钟时间区别:

墙钟时间包含多种非运算的等待耗时,例如等待磁盘IO、等待线程阻塞

CPU时间不包含这些耗时,多CPU或多核,会叠加这些CPU时间

CMS日志:截取部分日志

Java HotSpot(TM) 64-Bit Server VM (25.102-b14) for linux-amd64 JRE (1.8.0_102-b14), built on Jun 22 2016 18:43:17 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)
Memory: 4k page, physical 3880412k(1677240k free), swap 0k(0k free)
#因为使用了CMS,所以Young区使用了ParNew,从参数可以看出来:-XX:+UseConcMarkSweepGC -XX:+UseParNewGC
CommandLine flags: -XX:InitialHeapSize=62086592 -XX:MaxHeapSize=993385472 -XX:MaxNewSize=174485504 -XX:MaxTenuringThreshold=6 -XX:OldPLABSize=16 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
#刚开始为Young区GC
2019-07-15T10:50:17.152+0800: 0.706: [GC (Allocation Failure) 2019-07-15T10:50:17.152+0800: 0.706: [ParNew: 16384K->2048K(18432K), 0.0116281 secs] 16384K->4234K(59392K), 0.0117284 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2019-07-15T10:50:17.705+0800: 1.259: [GC (Allocation Failure) 2019-07-15T10:50:17.705+0800: 1.260: [ParNew: 18426K->2048K(18432K), 0.0166827 secs] 20612K->7790K(59392K), 0.0167603 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
2019-07-15T10:50:17.964+0800: 1.518: [GC (Allocation Failure) 2019-07-15T10:50:17.964+0800: 1.518: [ParNew: 18432K->2048K(18432K), 0.0131088 secs] 24174K->11214K(59392K), 0.0131987 secs] [Times: user=0.03 sys=0.00, real=0.01 secs]
2019-07-15T10:50:18.087+0800: 1.641: [GC (Allocation Failure) 2019-07-15T10:50:18.087+0800: 1.641: [ParNew: 18432K->2048K(18432K), 0.0063598 secs] 27598K->12525K(59392K), 0.0064490 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T10:50:18.171+0800: 1.725: [GC (Allocation Failure) 2019-07-15T10:50:18.171+0800: 1.725: [ParNew: 18432K->2047K(18432K), 0.0048486 secs] 28909K->13416K(59392K), 0.0049454 secs] [Times: user=0.00 sys=0.01, real=0.00 secs]
2019-07-15T10:50:18.253+0800: 1.807: [GC (Allocation Failure) 2019-07-15T10:50:18.253+0800: 1.807: [ParNew: 18431K->2048K(18432K), 0.0044206 secs] 29800K->14647K(59392K), 0.0044871 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.351+0800: 1.905: [GC (Allocation Failure) 2019-07-15T10:50:18.351+0800: 1.905: [ParNew: 18432K->2048K(18432K), 0.0078141 secs] 31031K->15528K(59392K), 0.0078983 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2019-07-15T10:50:18.438+0800: 1.992: [GC (Allocation Failure) 2019-07-15T10:50:18.438+0800: 1.992: [ParNew: 18432K->2048K(18432K), 0.0036144 secs] 31912K->15758K(59392K), 0.0036887 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-07-15T10:50:18.500+0800: 2.054: [GC (Allocation Failure) 2019-07-15T10:50:18.500+0800: 2.054: [ParNew: 18432K->2047K(18432K), 0.0043671 secs] 32142K->16245K(59392K), 0.0044290 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.574+0800: 2.128: [GC (Allocation Failure) 2019-07-15T10:50:18.574+0800: 2.128: [ParNew: 18431K->2048K(18432K), 0.0075469 secs] 32629K->16612K(59392K), 0.0076214 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T10:50:18.632+0800: 2.186: [GC (Allocation Failure) 2019-07-15T10:50:18.632+0800: 2.186: [ParNew: 18432K->2048K(18432K), 0.0056882 secs] 32996K->16953K(59392K), 0.0057710 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.700+0800: 2.254: [GC (Allocation Failure) 2019-07-15T10:50:18.700+0800: 2.254: [ParNew: 18432K->2047K(18432K), 0.0039387 secs] 33337K->17367K(59392K), 0.0039998 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.769+0800: 2.323: [GC (Allocation Failure) 2019-07-15T10:50:18.769+0800: 2.323: [ParNew: 18431K->2048K(18432K), 0.0080793 secs] 33751K->18524K(59392K), 0.0081855 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.841+0800: 2.395: [GC (Allocation Failure) 2019-07-15T10:50:18.841+0800: 2.395: [ParNew: 18432K->2047K(18432K), 0.0042404 secs] 34908K->19147K(59392K), 0.0043270 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.903+0800: 2.457: [GC (Allocation Failure) 2019-07-15T10:50:18.903+0800: 2.457: [ParNew: 18431K->2048K(18432K), 0.0040362 secs] 35531K->19653K(59392K), 0.0040956 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-07-15T10:50:18.962+0800: 2.516: [GC (Allocation Failure) 2019-07-15T10:50:18.962+0800: 2.516: [ParNew: 18432K->2039K(18432K), 0.0071315 secs] 36037K->19920K(59392K), 0.0072320 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T10:50:19.035+0800: 2.589: [GC (Allocation Failure) 2019-07-15T10:50:19.035+0800: 2.589: [ParNew: 18423K->2048K(18432K), 0.0048979 secs] 36304K->20760K(59392K), 0.0049775 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-07-15T10:50:19.101+0800: 2.655: [GC (Allocation Failure) 2019-07-15T10:50:19.101+0800: 2.655: [ParNew: 18432K->2048K(18432K), 0.0044687 secs] 37144K->21047K(59392K), 0.0045589 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-07-15T10:50:19.164+0800: 2.718: [GC (Allocation Failure) 2019-07-15T10:50:19.164+0800: 2.718: [ParNew: 18432K->2048K(18432K), 0.0079322 secs] 37431K->21701K(59392K), 0.0080210 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T10:50:19.235+0800: 2.789: [GC (Allocation Failure) 2019-07-15T10:50:19.235+0800: 2.789: [ParNew: 18432K->2048K(18432K), 0.0075261 secs] 38085K->22350K(59392K), 0.0076038 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T10:50:19.303+0800: 2.857: [GC (Allocation Failure) 2019-07-15T10:50:19.303+0800: 2.857: [ParNew: 18432K->2048K(18432K), 0.0072659 secs] 38734K->22980K(59392K), 0.0073609 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
#Old区发生GC,为FUll GC
#CMS初始标记,Old区为20M,总的为40M,堆区为24M,总的为59M
2019-07-15T10:50:19.317+0800: 2.871: [GC (CMS Initial Mark) [1 CMS-initial-mark: 20932K(40960K)] 24947K(59392K), 0.0020892 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
#并发标记
2019-07-15T10:50:19.320+0800: 2.874: [CMS-concurrent-mark-start]
#并发标记时间位0.41s
2019-07-15T10:50:19.361+0800: 2.915: [CMS-concurrent-mark: 0.041/0.041 secs] [Times: user=0.07 sys=0.01, real=0.04 secs]
#并发预清理
2019-07-15T10:50:19.361+0800: 2.915: [CMS-concurrent-preclean-start]
#时间为0.001s
2019-07-15T10:50:19.362+0800: 2.916: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
#可终止预清理
2019-07-15T10:50:19.362+0800: 2.916: [CMS-concurrent-abortable-preclean-start]
#发生Young GC
2019-07-15T10:50:19.369+0800: 2.923: [GC (Allocation Failure) 2019-07-15T10:50:19.369+0800: 2.923: [ParNew: 18432K->2047K(18432K), 0.0073641 secs] 39364K->23988K(59392K), 0.0074166 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
#可终止预清理时间位0.02s
2019-07-15T10:50:19.471+0800: 3.025: [CMS-concurrent-abortable-preclean: 0.020/0.109 secs] [Times: user=0.21 sys=0.00, real=0.11 secs]
#重新标记
2019-07-15T10:50:19.477+0800: 3.031: [GC (CMS Final Remark) [YG occupancy: 14850 K (18432 K)]2019-07-15T10:50:19.477+0800: 3.031: [Rescan (parallel) , 0.0088998 secs]2019-07-15T10:50:19.486+0800: 3.040: [weak refs processing, 0.0004368 secs]2019-07-15T10:50:19.486+0800: 3.040: [class unloading, 0.0036209 secs]2019-07-15T10:50:19.490+0800: 3.044: [scrub symbol table, 0.0020465 secs]2019-07-15T10:50:19.492+0800: 3.046: [scrub string table, 0.0009907 secs][1 CMS-remark: 21940K(40960K)] 36790K(59392K), 0.0165922 secs] [Times: user=0.03 sys=0.01, real=0.02 secs]
2019-07-15T10:50:19.494+0800: 3.048: [CMS-concurrent-sweep-start]
#并发清除时间位0.009s
2019-07-15T10:50:19.502+0800: 3.056: [CMS-concurrent-sweep: 0.009/0.009 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2019-07-15T10:50:19.502+0800: 3.056: [CMS-concurrent-reset-start]
#并发重置时间位0.044s
2019-07-15T10:50:19.547+0800: 3.101: [CMS-concurrent-reset: 0.044/0.044 secs] [Times: user=0.06 sys=0.02, real=0.04 secs]

G1日志:

#发生Young区的GC
2019-07-15T13:43:43.100+0800: 3.463: [GC pause (G1 Evacuation Pause) (young), 0.0191098 secs]
#并行的时间12.5 ms,GC工作线程为2,我的阿里云只是双核的,下面的Min、Max和Avg是指启动的这些工作线程的运行状况
[Parallel Time: 12.5 ms, GC Workers: 2]
#GC开始的时间点
[GC Worker Start (ms): Min: 3463.2, Avg: 3464.5, Max: 3465.8, Diff: 2.6]
#GC Root扫描的时间
[Ext Root Scanning (ms): Min: 0.3, Avg: 3.9, Max: 7.4, Diff: 7.1, Sum: 7.7]
#更新RSet的时间
[Update RS (ms): Min: 0.0, Avg: 1.6, Max: 3.1, Diff: 3.1, Sum: 3.1]
[Processed Buffers: Min: 0, Avg: 7.0, Max: 14, Diff: 14, Sum: 14]
#扫描RSet的时间
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.1, Diff: 0.1, Sum: 0.1]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.1, Max: 0.1, Diff: 0.1, Sum: 0.1]
[Object Copy (ms): Min: 5.0, Avg: 5.6, Max: 6.3, Diff: 1.3, Sum: 11.2]
[Termination (ms): Min: 0.0, Avg: 0.1, Max: 0.1, Diff: 0.1, Sum: 0.1]
[Termination Attempts: Min: 1, Avg: 1.0, Max: 1, Diff: 0, Sum: 2]
[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.9, Avg: 11.2, Max: 12.5, Diff: 2.6, Sum: 22.4]
[GC Worker End (ms): Min: 3475.7, Avg: 3475.7, Max: 3475.7, Diff: 0.0]
[Code Root Fixup: 0.0 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 6.5 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 4.5 ms]
[Ref Enq: 0.1 ms]
[Redirty Cards: 0.0 ms]
#就是存储大对象的Region
[Humongous Register: 0.0 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.1 ms]
#Eden区回收67.0M,变成135.0M,Survivors区从5120.0K->9216.0K,堆区从92M到29.9M,并且总大小翻倍
[Eden: 67.0M(67.0M)->0.0B(135.0M) Survivors: 5120.0K->9216.0K Heap: 92.0M(120.0M)->29.9M(240.0M)]
[Times: user=0.03 sys=0.00, real=0.02 secs]
#堆占有率达到InitiatingHeapOccupancyPercent,发生一次Mixed GC,会有global concurrent marking,时间为0.0166952s
2019-07-15T13:43:44.072+0800: 4.435: [GC pause (Metadata GC Threshold) (young) (initial-mark), 0.0166952 secs]
[Parallel Time: 12.5 ms, GC Workers: 2]
[GC Worker Start (ms): Min: 4435.1, Avg: 4435.9, Max: 4436.8, Diff: 1.7]
[Ext Root Scanning (ms): Min: 1.2, Avg: 2.1, Max: 2.9, Diff: 1.8, Sum: 4.1]
[Update RS (ms): Min: 1.6, Avg: 1.7, Max: 1.7, Diff: 0.2, Sum: 3.3]
[Processed Buffers: Min: 4, Avg: 7.5, Max: 11, Diff: 7, Sum: 15]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.1, Diff: 0.0, Sum: 0.1]
[Code Root Scanning (ms): Min: 0.2, Avg: 0.2, Max: 0.3, Diff: 0.1, Sum: 0.4]
[Object Copy (ms): Min: 7.5, Avg: 7.6, Max: 7.7, Diff: 0.1, Sum: 15.2]
[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Termination Attempts: Min: 1, Avg: 1.0, Max: 1, Diff: 0, Sum: 2]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[GC Worker Total (ms): Min: 10.7, Avg: 11.6, Max: 12.4, Diff: 1.7, Sum: 23.1]
[GC Worker End (ms): Min: 4447.5, Avg: 4447.5, Max: 4447.5, Diff: 0.0]
[Code Root Fixup: 0.1 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.1 ms]
[Other: 4.1 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 3.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.1 ms]
[Eden: 83.0M(135.0M)->0.0B(135.0M) Survivors: 9216.0K->9216.0K Heap: 112.9M(240.0M)->29.4M(240.0M)]
[Times: user=0.03 sys=0.01, real=0.02 secs]
#并发root Region扫描
2019-07-15T13:43:44.090+0800: 4.453: [GC concurrent-root-region-scan-start]
2019-07-15T13:43:44.104+0800: 4.467: [GC concurrent-root-region-scan-end, 0.0138623 secs]
#并发标记
2019-07-15T13:43:44.104+0800: 4.467: [GC concurrent-mark-start]
2019-07-15T13:43:44.166+0800: 4.529: [GC concurrent-mark-end, 0.0614277 secs]
#重新标记
2019-07-15T13:43:44.166+0800: 4.529: [GC remark 2019-07-15T13:43:44.166+0800: 4.529: [Finalize Marking, 0.0001259 secs] 2019-07-15T13:43:44.166+0800: 4.529: [GC ref-proc, 0.0001492 secs] 2019-07-15T13:43:44.166+0800: 4.529: [Unloading, 0.0067901 secs], 0.0072554 secs]
[Times: user=0.01 sys=0.00, real=0.01 secs]
2019-07-15T13:43:44.179+0800: 4.542: [GC cleanup 37M->31M(240M), 0.0005559 secs]
[Times: user=0.00 sys=0.00, real=0.00 secs]
#并发清除
2019-07-15T13:43:44.186+0800: 4.549: [GC concurrent-cleanup-start]
2019-07-15T13:43:44.186+0800: 4.549: [GC concurrent-cleanup-end, 0.0000283 secs]

当堆占有率达到InitiatingHeapOccupancyPercent,发生一次Mixed GC,默认45%

# jinfo -flag InitiatingHeapOccupancyPercent 11833
-XX:InitiatingHeapOccupancyPercent=45

GC日志可以参考下面的地址:

CMS日志格式:https://blogs.oracle.com/poonam/understanding-cms-gc-logs

G1日志格式:https://blogs.oracle.com/poonam/understanding-g1-gc-logs

解释:

DefNew:default new generation

PSYoungGen:Parallel Scavenge generation

ParNew:Parallel New Generation

老年代和永久带同理,名称也是由收集器决定

Minor GC 对年轻代进行回

Major GC 是清理老年代

Full GC 是清理整个堆空间—包括年轻代和老年代

java虚拟机(十一)--GC日志分析的更多相关文章

  1. java虚拟机(十三)--GC调优思路

    GC调优对我们开发人员来说,如果你想要技术方面一直发展下去,这部分内容的了解是必不可少的,jvm对于工作.面试来说都很重要,GC调优的问题 更是重中之重,因为是对你jvm学习内容的实践,知识只有应用实 ...

  2. Android内存优化(二)DVM和ART的GC日志分析

    相关文章 Android内存优化系列 Java虚拟机系列 前言 在Java虚拟机(三)垃圾标记算法与Java对象的生命周期这篇文章中,提到了Java虚拟机的GC日志.DVM和ART的GC日志与Java ...

  3. JAVA 从GC日志分析堆内存 第七节

    JAVA 从GC日志分析堆内存 第七节   在上一章中,我们只设置了整个堆的内存大小.但是我们知道,堆又分为了新生代,年老代.他们之间的内存怎么分配呢?新生代又分为Eden和Survivor,他们的比 ...

  4. GC之七--gc日志分析工具

    性能测试排查定位问题,分析调优过程中,会遇到要分析gc日志,人肉分析gc日志有时比较困难,相关图形化或命令行工具可以有效地帮助辅助分析. Gc日志参数 通过在tomcat启动脚本中添加相关参数生成gc ...

  5. jvm的GC日志分析 [转]

      jvm的GC日志分析 标签: jvm内存javagc 2015-06-22 16:37 1566人阅读 评论(1) 收藏 举报  分类: Java(4)  JVM的GC日志的主要参数包括如下几个: ...

  6. 【转】gc日志分析工具

    性能测试排查定位问题,分析调优过程中,会遇到要分析gc日志,人肉分析gc日志有时比较困难,相关图形化或命令行工具可以有效地帮助辅助分析. Gc日志参数 通过在tomcat启动脚本中添加相关参数生成gc ...

  7. Java虚拟机类加载机制——案例分析

    转载: Java虚拟机类加载机制--案例分析   在<Java虚拟机类加载机制>一文中详细阐述了类加载的过程,并举了几个例子进行了简要分析,在文章的最后留了一个悬念给各位,这里来揭开这个悬 ...

  8. GC日志分析详解

    点击返回上层目录 原创声明:作者:Arnold.zhao 博客园地址:https://www.cnblogs.com/zh94 GC日志分析详解 以ParallelGC为例,YoungGC日志解释如下 ...

  9. java虚拟机之GC(转)

    垃圾回收主要内容: 1. 那些内存需要回收? 2. 什么时候回收? 3. 如何回收? 垃圾回收主要针对运行时数据区那些区域? 运行时数据区的线程私有区域有:虚拟机栈,本地方法栈,程序计数器等: 栈中的 ...

随机推荐

  1. 1&period;Linux常用命令

    命令名称:ls 格式: ls  [-选项] [参数]  注:中括号表示可选 命令路径:/bin/ls 功能描述:显示信息 例如: 选项 -a 显示所有的文件,包括隐藏文件,(以 . 开头的文件) -l ...

  2. 第二章平稳时间序列模型——ACF和PACF和样本ACF&sol;PACF

    自相关函数/自相关曲线ACF   AR(1)模型的ACF: 模型为: 当其满足平稳的必要条件|a1|<1时(所以说,自相关系数是在平稳条件下求得的):          y(t)和y(t-s)的 ...

  3. 学习笔记—Fragement &plus;Actionbar

    这里实现的是tabhost类型的菜单选项,还有下拉菜单选项的 http://www.cnblogs.com/hanyuan/archive/2012/04/11/android_actionbar_a ...

  4. Domain Shutdown Error&lpar;JBAS010850&rpar;

    In a manged domain, the shutdown operation is not located in the root resource (i.e. address []). A ...

  5. pig中使用的一些实例语法

    在pig中, dump和store会分别完毕两个MR, 不会一起进行 1:载入名用正則表達式: LOAD '/user/wizad/data/wizad/raw/2014-0{6,7-0,7-1,7- ...

  6. 201521123005《java程序设计》第三周学习总结

    1. 本周学习总结 初学面向对象,会学习到很多碎片化的概念与知识.使用思维导图将这些碎片化的概念.知识组织起来.使用工具画出本周学习到的知识点. 参考资料: 百度脑图 XMind 2. 书面作业 ·Q ...

  7. 〖Linux〗Ubuntu14&period;04安装32位运行库

    在终端操作: sudo dpkg --add-architecture i386 echo "deb http://old-releases.ubuntu.com/ubuntu/ rarin ...

  8. STL之std&colon;&colon;set、std&colon;&colon;map的lower&lowbar;bound和upper&lowbar;bound函数使用说明

    由于在使用std::map时感觉lower_bound和upper_bound函数了解不多,这里整理并记录下相关用法及功能. STL的map.multimap.set.multiset都有三个比较特殊 ...

  9. C&plus;&plus; 0x std&colon;&colon;async 的应用

    #include <iostream> #include <thread> #include <mutex> #include <vector> #in ...

  10. 定制Eclipse

    转载自http://chriszz.sinaapp.com 一般从Eclipse官网eclipse.org下载的,都是打包好的版本,比如标准版.jee版.java版.c++版.php版.测试版等.有时 ...