CMSInitiatingOccupancyFraction

CMSInitiatingOccupancyFraction

即使没有达到CMSInitiatingOccupancyFraction,我们也有一个1.7.0_151-b00 JVM开始执行连续的CMS周期。

我试图了解为什么JVM在到达CMSInitiatingOccupancyFraction之前就开始执行CMS。

JVM命令行如下:

CommandLine flags: -XX:+CMSConcurrentMTEnabled -XX:CMSInitiatingOccupancyFraction=75 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:ConcGCThreads=4 -XX:+DisableExplicitGC -XX:GCLogFileSize=3145728 -XX:InitialHeapSize=7505707008 -XX:MaxHeapSize=7505707008 -XX:MaxNewSize=3221225472 -XX:MaxPermSize=536870912 -XX:NewSize=3221225472 -XX:NumberOfGCLogFiles=5 -XX:OldPLABSize=16 -XX:ParallelGCThreads=8 -XX:PermSize=536870912 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+ScavengeBeforeFullGC -XX:SurvivorRatio=30 -XX:-TraceClassUnloading -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseGCLogFileRotation -XX:+UseParNewGC


这是GC日志的示例:

2019-03-05T23:50:16.123-0500: 181182.324: [GC2019-03-05T23:50:16.123-0500: 181182.324: [ParNew: 2981168K->35897K(3047424K), 0.0598380 secs] 5745339K->2800067K(7231488K), 0.0600900 secs] [Times: user=0.14 sys=0.00, real=0.06 secs]
2019-03-05T23:59:05.298-0500: 181711.499: [GC2019-03-05T23:59:05.298-0500: 181711.499: [ParNew: 2985017K->38413K(3047424K), 0.0750150 secs] 5749187K->2802583K(7231488K), 0.0752680 secs] [Times: user=0.18 sys=0.00, real=0.07 secs]
2019-03-06T00:00:49.806-0500: 181816.007: [GC2019-03-06T00:00:49.806-0500: 181816.007: [ParNew: 2956247K->98304K(3047424K), 0.0743290 secs] 5720417K->2899027K(7231488K), 0.0745400 secs] [Times: user=0.28 sys=0.00, real=0.07 secs]
2019-03-06T00:00:53.260-0500: 181819.461: [GC2019-03-06T00:00:53.260-0500: 181819.461: [ParNew: 2989572K->98304K(3047424K), 0.3472730 secs] 5790295K->3385821K(7231488K), 0.3475250 secs] [Times: user=1.30 sys=0.00, real=0.35 secs]
2019-03-06T00:00:53.615-0500: 181819.816: [GC [1 CMS-initial-mark: 3287517K(4184064K)] 3444116K(7231488K), 0.0111440 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:00:53.626-0500: 181819.827: [CMS-concurrent-mark-start]
2019-03-06T00:00:54.091-0500: 181820.292: [CMS-concurrent-mark: 0.461/0.465 secs] [Times: user=1.76 sys=0.08, real=0.46 secs]
2019-03-06T00:00:54.091-0500: 181820.292: [CMS-concurrent-preclean-start]
2019-03-06T00:00:54.097-0500: 181820.298: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:00:54.097-0500: 181820.298: [CMS-concurrent-abortable-preclean-start]
 CMS: abort preclean due to time 2019-03-06T00:00:59.187-0500: 181825.388: [CMS-concurrent-abortable-preclean: 0.771/5.090 secs] [Times: user=1.67 sys=0.02, real=5.09 secs]
2019-03-06T00:00:59.189-0500: 181825.390: [GC[YG occupancy: 1027396 K (3047424 K)]2019-03-06T00:00:59.189-0500: 181825.390: [GC2019-03-06T00:00:59.189-0500: 181825.390: [ParNew (promotion failed): 1027396K->971394K(3047424K), 0.0694260 secs] 4314914K->4290206K(7231488K), 0.0695910 secs] [Times: user=0.23 sys=0.00, real=0.07 secs]
2019-03-06T00:00:59.259-0500: 181825.460: [Rescan (parallel) , 0.0075580 secs]2019-03-06T00:00:59.266-0500: 181825.467: [weak refs processing, 0.0134090 secs]2019-03-06T00:00:59.280-0500: 181825.481: [scrub string table, 0.0049400 secs] [1 CMS-remark: 3318812K(4184064K)] 4290206K(7231488K), 0.0960510 secs] [Times: user=0.28 sys=0.00, real=0.10 secs]
2019-03-06T00:00:59.285-0500: 181825.486: [CMS-concurrent-sweep-start]
2019-03-06T00:01:00.981-0500: 181827.182: [CMS-concurrent-sweep: 1.695/1.695 secs] [Times: user=1.69 sys=0.01, real=1.69 secs]
2019-03-06T00:01:00.981-0500: 181827.182: [CMS-concurrent-reset-start]
2019-03-06T00:01:00.996-0500: 181827.197: [CMS-concurrent-reset: 0.015/0.015 secs] [Times: user=0.01 sys=0.00, real=0.02 secs]
2019-03-06T00:01:02.998-0500: 181829.199: [GC [1 CMS-initial-mark: 1453847K(4184064K)] 2433271K(7231488K), 0.0172810 secs] [Times: user=0.01 sys=0.00, real=0.02 secs]
2019-03-06T00:01:03.016-0500: 181829.217: [CMS-concurrent-mark-start]
2019-03-06T00:01:03.287-0500: 181829.488: [CMS-concurrent-mark: 0.271/0.271 secs] [Times: user=1.08 sys=0.00, real=0.27 secs]
2019-03-06T00:01:03.287-0500: 181829.488: [CMS-concurrent-preclean-start]
2019-03-06T00:01:03.300-0500: 181829.501: [CMS-concurrent-preclean: 0.012/0.013 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
2019-03-06T00:01:03.300-0500: 181829.501: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:03.300-0500: 181829.501: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:03.300-0500: 181829.501: [GC[YG occupancy: 979423 K (3047424 K)]2019-03-06T00:01:03.300-0500: 181829.501: [GC2019-03-06T00:01:03.301-0500: 181829.502: [ParNew: 979423K->979423K(3047424K), 0.0000290 secs] 2433271K->2433271K(7231488K), 0.0001210 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:03.301-0500: 181829.502: [Rescan (parallel) , 0.0097700 secs]2019-03-06T00:01:03.310-0500: 181829.511: [weak refs processing, 0.0035040 secs]2019-03-06T00:01:03.314-0500: 181829.515: [scrub string table, 0.0044180 secs] [1 CMS-remark: 1453847K(4184064K)] 2433271K(7231488K), 0.0180610 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
2019-03-06T00:01:03.319-0500: 181829.520: [CMS-concurrent-sweep-start]
2019-03-06T00:01:03.761-0500: 181829.962: [CMS-concurrent-sweep: 0.442/0.442 secs] [Times: user=0.45 sys=0.00, real=0.44 secs]
2019-03-06T00:01:03.761-0500: 181829.962: [CMS-concurrent-reset-start]
2019-03-06T00:01:03.768-0500: 181829.969: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-03-06T00:01:05.770-0500: 181831.971: [GC [1 CMS-initial-mark: 1162451K(4184064K)] 2151266K(7231488K), 0.0208420 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]
2019-03-06T00:01:05.791-0500: 181831.992: [CMS-concurrent-mark-start]
2019-03-06T00:01:06.068-0500: 181832.269: [CMS-concurrent-mark: 0.277/0.277 secs] [Times: user=1.11 sys=0.00, real=0.28 secs]
2019-03-06T00:01:06.068-0500: 181832.269: [CMS-concurrent-preclean-start]
2019-03-06T00:01:06.074-0500: 181832.275: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-03-06T00:01:06.074-0500: 181832.275: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:06.074-0500: 181832.275: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:06.075-0500: 181832.276: [GC[YG occupancy: 988815 K (3047424 K)]2019-03-06T00:01:06.075-0500: 181832.276: [GC2019-03-06T00:01:06.075-0500: 181832.276: [ParNew: 988815K->988815K(3047424K), 0.0000250 secs] 2151266K->2151266K(7231488K), 0.0001110 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:06.075-0500: 181832.276: [Rescan (parallel) , 0.0143500 secs]2019-03-06T00:01:06.090-0500: 181832.291: [weak refs processing, 0.0043930 secs]2019-03-06T00:01:06.094-0500: 181832.295: [scrub string table, 0.0051840 secs] [1 CMS-remark: 1162451K(4184064K)] 2151266K(7231488K), 0.0243670 secs] [Times: user=0.07 sys=0.00, real=0.02 secs]
2019-03-06T00:01:06.101-0500: 181832.302: [CMS-concurrent-sweep-start]
2019-03-06T00:01:06.718-0500: 181832.919: [CMS-concurrent-sweep: 0.617/0.617 secs] [Times: user=0.62 sys=0.00, real=0.62 secs]
2019-03-06T00:01:06.718-0500: 181832.919: [CMS-concurrent-reset-start]
2019-03-06T00:01:06.725-0500: 181832.926: [CMS-concurrent-reset: 0.008/0.008 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:08.727-0500: 181834.928: [GC [1 CMS-initial-mark: 1162240K(4184064K)] 2152208K(7231488K), 0.0206780 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]
2019-03-06T00:01:08.748-0500: 181834.949: [CMS-concurrent-mark-start]
2019-03-06T00:01:09.014-0500: 181835.215: [CMS-concurrent-mark: 0.266/0.266 secs] [Times: user=1.05 sys=0.00, real=0.27 secs]
2019-03-06T00:01:09.014-0500: 181835.215: [CMS-concurrent-preclean-start]
2019-03-06T00:01:09.021-0500: 181835.222: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-03-06T00:01:09.021-0500: 181835.222: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:09.021-0500: 181835.222: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:09.021-0500: 181835.222: [GC[YG occupancy: 989968 K (3047424 K)]2019-03-06T00:01:09.021-0500: 181835.222: [GC2019-03-06T00:01:09.022-0500: 181835.223: [ParNew: 989968K->989968K(3047424K), 0.0000250 secs] 2152208K->2152208K(7231488K), 0.0001120 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:09.022-0500: 181835.223: [Rescan (parallel) , 0.0133410 secs]2019-03-06T00:01:09.035-0500: 181835.236: [weak refs processing, 0.0039190 secs]2019-03-06T00:01:09.039-0500: 181835.240: [scrub string table, 0.0047490 secs] [1 CMS-remark: 1162240K(4184064K)] 2152208K(7231488K), 0.0223870 secs] [Times: user=0.06 sys=0.00, real=0.03 secs]
2019-03-06T00:01:09.044-0500: 181835.245: [CMS-concurrent-sweep-start]
2019-03-06T00:01:09.310-0500: 181835.511: [CMS-concurrent-sweep: 0.266/0.266 secs] [Times: user=0.27 sys=0.00, real=0.26 secs]
2019-03-06T00:01:09.310-0500: 181835.511: [CMS-concurrent-reset-start]
2019-03-06T00:01:09.317-0500: 181835.518: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-03-06T00:01:11.319-0500: 181837.520: [GC [1 CMS-initial-mark: 1162240K(4184064K)] 2159518K(7231488K), 0.0224950 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]
2019-03-06T00:01:11.342-0500: 181837.543: [CMS-concurrent-mark-start]
2019-03-06T00:01:11.611-0500: 181837.812: [CMS-concurrent-mark: 0.270/0.270 secs] [Times: user=1.08 sys=0.00, real=0.27 secs]
2019-03-06T00:01:11.611-0500: 181837.812: [CMS-concurrent-preclean-start]
2019-03-06T00:01:11.619-0500: 181837.820: [CMS-concurrent-preclean: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:11.619-0500: 181837.820: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:11.619-0500: 181837.820: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:11.620-0500: 181837.821: [GC[YG occupancy: 997278 K (3047424 K)]2019-03-06T00:01:11.620-0500: 181837.821: [GC2019-03-06T00:01:11.620-0500: 181837.821: [ParNew: 997278K->997278K(3047424K), 0.0000260 secs] 2159518K->2159518K(7231488K), 0.0001100 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:11.620-0500: 181837.821: [Rescan (parallel) , 0.0157150 secs]2019-03-06T00:01:11.635-0500: 181837.836: [weak refs processing, 0.0038150 secs]2019-03-06T00:01:11.639-0500: 181837.840: [scrub string table, 0.0044660 secs] [1 CMS-remark: 1162240K(4184064K)] 2159518K(7231488K), 0.0243440 secs] [Times: user=0.06 sys=0.00, real=0.03 secs]
2019-03-06T00:01:11.644-0500: 181837.845: [CMS-concurrent-sweep-start]
2019-03-06T00:01:11.896-0500: 181838.097: [CMS-concurrent-sweep: 0.251/0.251 secs] [Times: user=0.26 sys=0.00, real=0.25 secs]
2019-03-06T00:01:11.896-0500: 181838.097: [CMS-concurrent-reset-start]
2019-03-06T00:01:11.903-0500: 181838.104: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-03-06T00:01:13.904-0500: 181840.105: [GC [1 CMS-initial-mark: 1162240K(4184064K)] 2161535K(7231488K), 0.0232400 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]
2019-03-06T00:01:13.928-0500: 181840.129: [CMS-concurrent-mark-start]
2019-03-06T00:01:14.187-0500: 181840.388: [CMS-concurrent-mark: 0.259/0.259 secs] [Times: user=1.02 sys=0.00, real=0.26 secs]
2019-03-06T00:01:14.187-0500: 181840.388: [CMS-concurrent-preclean-start]
2019-03-06T00:01:14.195-0500: 181840.397: [CMS-concurrent-preclean: 0.008/0.008 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:14.196-0500: 181840.397: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:14.196-0500: 181840.397: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:14.196-0500: 181840.397: [GC[YG occupancy: 999294 K (3047424 K)]2019-03-06T00:01:14.197-0500: 181840.398: [GC2019-03-06T00:01:14.197-0500: 181840.398: [ParNew: 999294K->999294K(3047424K), 0.0000260 secs] 2161535K->2161535K(7231488K), 0.0001160 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:14.197-0500: 181840.398: [Rescan (parallel) , 0.0161250 secs]2019-03-06T00:01:14.213-0500: 181840.414: [weak refs processing, 0.0040860 secs]2019-03-06T00:01:14.217-0500: 181840.418: [scrub string table, 0.0047250 secs] [1 CMS-remark: 1162240K(4184064K)] 2161535K(7231488K), 0.0253240 secs] [Times: user=0.07 sys=0.00, real=0.02 secs]
2019-03-06T00:01:14.222-0500: 181840.423: [CMS-concurrent-sweep-start]
2019-03-06T00:01:14.483-0500: 181840.684: [CMS-concurrent-sweep: 0.261/0.261 secs] [Times: user=0.27 sys=0.00, real=0.26 secs]
2019-03-06T00:01:14.483-0500: 181840.684: [CMS-concurrent-reset-start]
2019-03-06T00:01:14.490-0500: 181840.691: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-03-06T00:01:16.492-0500: 181842.693: [GC [1 CMS-initial-mark: 1162238K(4184064K)] 2170926K(7231488K), 0.0266030 secs] [Times: user=0.02 sys=0.00, real=0.03 secs]
2019-03-06T00:01:16.519-0500: 181842.720: [CMS-concurrent-mark-start]
2019-03-06T00:01:16.809-0500: 181843.010: [CMS-concurrent-mark: 0.290/0.290 secs] [Times: user=1.16 sys=0.00, real=0.29 secs]
2019-03-06T00:01:16.809-0500: 181843.010: [CMS-concurrent-preclean-start]
2019-03-06T00:01:16.814-0500: 181843.015: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:16.815-0500: 181843.016: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:16.815-0500: 181843.016: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:16.815-0500: 181843.016: [GC[YG occupancy: 1008688 K (3047424 K)]2019-03-06T00:01:16.815-0500: 181843.016: [GC2019-03-06T00:01:16.815-0500: 181843.016: [ParNew: 1008688K->1008688K(3047424K), 0.0000270 secs] 2170926K->2170926K(7231488K), 0.0001070 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:16.815-0500: 181843.016: [Rescan (parallel) , 0.0205190 secs]2019-03-06T00:01:16.836-0500: 181843.037: [weak refs processing, 0.0038010 secs]2019-03-06T00:01:16.840-0500: 181843.041: [scrub string table, 0.0043700 secs] [1 CMS-remark: 1162238K(4184064K)] 2170926K(7231488K), 0.0290180 secs] [Times: user=0.08 sys=0.00, real=0.03 secs]
2019-03-06T00:01:16.844-0500: 181843.045: [CMS-concurrent-sweep-start]
2019-03-06T00:01:17.098-0500: 181843.299: [CMS-concurrent-sweep: 0.253/0.253 secs] [Times: user=0.26 sys=0.00, real=0.25 secs]
2019-03-06T00:01:17.098-0500: 181843.299: [CMS-concurrent-reset-start]
2019-03-06T00:01:17.105-0500: 181843.306: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:19.107-0500: 181845.308: [GC [1 CMS-initial-mark: 1162238K(4184064K)] 2172118K(7231488K), 0.0263560 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]
2019-03-06T00:01:19.134-0500: 181845.335: [CMS-concurrent-mark-start]
2019-03-06T00:01:19.396-0500: 181845.597: [CMS-concurrent-mark: 0.263/0.263 secs] [Times: user=1.05 sys=0.00, real=0.27 secs]
2019-03-06T00:01:19.396-0500: 181845.597: [CMS-concurrent-preclean-start]
2019-03-06T00:01:19.402-0500: 181845.603: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:19.403-0500: 181845.604: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:19.403-0500: 181845.604: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:19.403-0500: 181845.604: [GC[YG occupancy: 1009880 K (3047424 K)]2019-03-06T00:01:19.403-0500: 181845.604: [GC2019-03-06T00:01:19.403-0500: 181845.604: [ParNew: 1009880K->1009880K(3047424K), 0.0000240 secs] 2172118K->2172118K(7231488K), 0.0001030 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:19.403-0500: 181845.604: [Rescan (parallel) , 0.0469840 secs]2019-03-06T00:01:19.450-0500: 181845.651: [weak refs processing, 0.0041000 secs]2019-03-06T00:01:19.455-0500: 181845.656: [scrub string table, 0.0045030 secs] [1 CMS-remark: 1162238K(4184064K)] 2172118K(7231488K), 0.0559270 secs] [Times: user=0.19 sys=0.00, real=0.06 secs]
2019-03-06T00:01:19.459-0500: 181845.660: [CMS-concurrent-sweep-start]
2019-03-06T00:01:19.711-0500: 181845.912: [CMS-concurrent-sweep: 0.251/0.251 secs] [Times: user=0.25 sys=0.00, real=0.25 secs]
2019-03-06T00:01:19.711-0500: 181845.912: [CMS-concurrent-reset-start]
2019-03-06T00:01:19.718-0500: 181845.919: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:21.720-0500: 181847.921: [GC [1 CMS-initial-mark: 1162238K(4184064K)] 2187866K(7231488K), 0.0321750 secs] [Times: user=0.03 sys=0.00, real=0.03 secs]
2019-03-06T00:01:21.753-0500: 181847.954: [CMS-concurrent-mark-start]
2019-03-06T00:01:22.010-0500: 181848.211: [CMS-concurrent-mark: 0.257/0.257 secs] [Times: user=1.03 sys=0.00, real=0.26 secs]
2019-03-06T00:01:22.010-0500: 181848.211: [CMS-concurrent-preclean-start]
2019-03-06T00:01:22.018-0500: 181848.219: [CMS-concurrent-preclean: 0.008/0.009 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:22.018-0500: 181848.219: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:22.018-0500: 181848.219: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:22.019-0500: 181848.220: [GC[YG occupancy: 1025628 K (3047424 K)]2019-03-06T00:01:22.019-0500: 181848.220: [GC2019-03-06T00:01:22.019-0500: 181848.220: [ParNew: 1025628K->1025628K(3047424K), 0.0000260 secs] 2187866K->2187866K(7231488K), 0.0001080 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:22.019-0500: 181848.220: [Rescan (parallel) , 0.0234820 secs]2019-03-06T00:01:22.043-0500: 181848.244: [weak refs processing, 0.0038410 secs]2019-03-06T00:01:22.047-0500: 181848.248: [scrub string table, 0.0045660 secs] [1 CMS-remark: 1162238K(4184064K)] 2187866K(7231488K), 0.0322360 secs] [Times: user=0.10 sys=0.00, real=0.03 secs]
2019-03-06T00:01:22.052-0500: 181848.253: [CMS-concurrent-sweep-start]
2019-03-06T00:01:22.293-0500: 181848.494: [CMS-concurrent-sweep: 0.241/0.241 secs] [Times: user=0.24 sys=0.00, real=0.24 secs]
2019-03-06T00:01:22.293-0500: 181848.494: [CMS-concurrent-reset-start]
2019-03-06T00:01:22.300-0500: 181848.501: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:24.302-0500: 181850.503: [GC [1 CMS-initial-mark: 1162213K(4184064K)] 2189000K(7231488K), 0.0296210 secs] [Times: user=0.03 sys=0.00, real=0.03 secs]
2019-03-06T00:01:24.331-0500: 181850.532: [CMS-concurrent-mark-start]
2019-03-06T00:01:24.597-0500: 181850.798: [CMS-concurrent-mark: 0.265/0.265 secs] [Times: user=1.06 sys=0.00, real=0.27 secs]
2019-03-06T00:01:24.597-0500: 181850.798: [CMS-concurrent-preclean-start]
2019-03-06T00:01:24.603-0500: 181850.804: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2019-03-06T00:01:24.603-0500: 181850.804: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:24.603-0500: 181850.804: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:24.604-0500: 181850.805: [GC[YG occupancy: 1026789 K (3047424 K)]2019-03-06T00:01:24.604-0500: 181850.805: [GC2019-03-06T00:01:24.604-0500: 181850.805: [ParNew: 1026789K->1026789K(3047424K), 0.0000260 secs] 2189002K->2189002K(7231488K), 0.0001030 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:24.604-0500: 181850.805: [Rescan (parallel) , 0.0237750 secs]2019-03-06T00:01:24.628-0500: 181850.829: [weak refs processing, 0.0038520 secs]2019-03-06T00:01:24.631-0500: 181850.832: [scrub string table, 0.0045490 secs] [1 CMS-remark: 1162213K(4184064K)] 2189002K(7231488K), 0.0325080 secs] [Times: user=0.10 sys=0.00, real=0.04 secs]
2019-03-06T00:01:24.636-0500: 181850.837: [CMS-concurrent-sweep-start]
2019-03-06T00:01:24.886-0500: 181851.087: [CMS-concurrent-sweep: 0.250/0.250 secs] [Times: user=0.25 sys=0.00, real=0.25 secs]
2019-03-06T00:01:24.886-0500: 181851.087: [CMS-concurrent-reset-start]
2019-03-06T00:01:24.893-0500: 181851.094: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:26.895-0500: 181853.096: [GC [1 CMS-initial-mark: 1162213K(4184064K)] 2198393K(7231488K), 0.0433240 secs] [Times: user=0.04 sys=0.00, real=0.04 secs]
2019-03-06T00:01:26.939-0500: 181853.140: [CMS-concurrent-mark-start]
2019-03-06T00:01:27.209-0500: 181853.410: [CMS-concurrent-mark: 0.270/0.270 secs] [Times: user=1.08 sys=0.00, real=0.27 secs]
2019-03-06T00:01:27.210-0500: 181853.411: [CMS-concurrent-preclean-start]
2019-03-06T00:01:27.216-0500: 181853.417: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:27.216-0500: 181853.417: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:27.216-0500: 181853.417: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:27.217-0500: 181853.418: [GC[YG occupancy: 1036180 K (3047424 K)]2019-03-06T00:01:27.217-0500: 181853.418: [GC2019-03-06T00:01:27.217-0500: 181853.418: [ParNew: 1036180K->1036180K(3047424K), 0.0000270 secs] 2198393K->2198393K(7231488K), 0.0001210 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:27.217-0500: 181853.418: [Rescan (parallel) , 0.0518560 secs]2019-03-06T00:01:27.269-0500: 181853.470: [weak refs processing, 0.0048580 secs]2019-03-06T00:01:27.274-0500: 181853.475: [scrub string table, 0.0044990 secs] [1 CMS-remark: 1162213K(4184064K)] 2198393K(7231488K), 0.0616180 secs] [Times: user=0.21 sys=0.00, real=0.06 secs]
2019-03-06T00:01:27.279-0500: 181853.480: [CMS-concurrent-sweep-start]
2019-03-06T00:01:27.528-0500: 181853.729: [CMS-concurrent-sweep: 0.250/0.250 secs] [Times: user=0.25 sys=0.00, real=0.25 secs]
2019-03-06T00:01:27.528-0500: 181853.729: [CMS-concurrent-reset-start]
2019-03-06T00:01:27.535-0500: 181853.736: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:29.537-0500: 181855.738: [GC [1 CMS-initial-mark: 1162213K(4184064K)] 2199544K(7231488K), 0.0343370 secs] [Times: user=0.03 sys=0.00, real=0.03 secs]
2019-03-06T00:01:29.572-0500: 181855.773: [CMS-concurrent-mark-start]
2019-03-06T00:01:29.833-0500: 181856.034: [CMS-concurrent-mark: 0.262/0.262 secs] [Times: user=1.04 sys=0.00, real=0.26 secs]
2019-03-06T00:01:29.834-0500: 181856.035: [CMS-concurrent-preclean-start]
2019-03-06T00:01:29.839-0500: 181856.040: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:29.839-0500: 181856.040: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:29.839-0500: 181856.040: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:29.840-0500: 181856.041: [GC[YG occupancy: 1037331 K (3047424 K)]2019-03-06T00:01:29.840-0500: 181856.041: [GC2019-03-06T00:01:29.840-0500: 181856.041: [ParNew: 1037331K->1037331K(3047424K), 0.0000250 secs] 2199544K->2199544K(7231488K), 0.0000990 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:29.840-0500: 181856.041: [Rescan (parallel) , 0.0302710 secs]2019-03-06T00:01:29.870-0500: 181856.071: [weak refs processing, 0.0046400 secs]2019-03-06T00:01:29.875-0500: 181856.076: [scrub string table, 0.0065020 secs] [1 CMS-remark: 1162213K(4184064K)] 2199544K(7231488K), 0.0417850 secs] [Times: user=0.12 sys=0.00, real=0.04 secs]
2019-03-06T00:01:29.882-0500: 181856.083: [CMS-concurrent-sweep-start]
2019-03-06T00:01:30.362-0500: 181856.563: [CMS-concurrent-sweep: 0.480/0.480 secs] [Times: user=0.53 sys=0.02, real=0.48 secs]
2019-03-06T00:01:30.362-0500: 181856.563: [CMS-concurrent-reset-start]
2019-03-06T00:01:30.369-0500: 181856.570: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:32.371-0500: 181858.572: [GC [1 CMS-initial-mark: 1162213K(4184064K)] 2207344K(7231488K), 0.0354480 secs] [Times: user=0.03 sys=0.00, real=0.04 secs]
2019-03-06T00:01:32.406-0500: 181858.607: [CMS-concurrent-mark-start]
2019-03-06T00:01:32.672-0500: 181858.873: [CMS-concurrent-mark: 0.265/0.265 secs] [Times: user=1.04 sys=0.00, real=0.26 secs]
2019-03-06T00:01:32.672-0500: 181858.873: [CMS-concurrent-preclean-start]
2019-03-06T00:01:32.678-0500: 181858.879: [CMS-concurrent-preclean: 0.006/0.006 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2019-03-06T00:01:32.678-0500: 181858.879: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:32.678-0500: 181858.879: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:32.679-0500: 181858.880: [GC[YG occupancy: 1045131 K (3047424 K)]2019-03-06T00:01:32.679-0500: 181858.880: [GC2019-03-06T00:01:32.679-0500: 181858.880: [ParNew: 1045131K->1045131K(3047424K), 0.0000250 secs] 2207344K->2207344K(7231488K), 0.0001250 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:32.679-0500: 181858.880: [Rescan (parallel) , 0.0402310 secs]2019-03-06T00:01:32.719-0500: 181858.920: [weak refs processing, 0.0039050 secs]2019-03-06T00:01:32.723-0500: 181858.924: [scrub string table, 0.0042770 secs] [1 CMS-remark: 1162213K(4184064K)] 2207344K(7231488K), 0.0487640 secs] [Times: user=0.16 sys=0.00, real=0.05 secs]
2019-03-06T00:01:32.728-0500: 181858.929: [CMS-concurrent-sweep-start]
2019-03-06T00:01:32.970-0500: 181859.171: [CMS-concurrent-sweep: 0.242/0.242 secs] [Times: user=0.25 sys=0.00, real=0.24 secs]
2019-03-06T00:01:32.970-0500: 181859.171: [CMS-concurrent-reset-start]
2019-03-06T00:01:32.977-0500: 181859.178: [CMS-concurrent-reset: 0.007/0.007 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-03-06T00:01:34.978-0500: 181861.179: [GC [1 CMS-initial-mark: 1162212K(4184064K)] 2208544K(7231488K), 0.0351780 secs] [Times: user=0.04 sys=0.00, real=0.03 secs]
2019-03-06T00:01:35.014-0500: 181861.215: [CMS-concurrent-mark-start]
2019-03-06T00:01:35.289-0500: 181861.490: [CMS-concurrent-mark: 0.276/0.276 secs] [Times: user=1.07 sys=0.00, real=0.28 secs]
2019-03-06T00:01:35.289-0500: 181861.490: [CMS-concurrent-preclean-start]
2019-03-06T00:01:35.296-0500: 181861.497: [CMS-concurrent-preclean: 0.007/0.007 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2019-03-06T00:01:35.297-0500: 181861.498: [CMS-concurrent-abortable-preclean-start]
2019-03-06T00:01:35.297-0500: 181861.498: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2019-03-06T00:01:35.297-0500: 181861.498: [GC[YG occupancy: 1048419 K (3047424 K)]2019-03-06T00:01:35.297-0500: 181861.498: [GC2019-03-06T00:01:35.297-0500: 181861.498: [ParNew: 1048419K->1048419K(3047424K), 0.0000270 secs] 2210632K->2210632K(7231488K), 0.0001120 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]

最佳答案

第一个初始标记事件的旧空间占用率为78%,因此JVM的行为符合以下CMS选项。

-XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly


仔细查看行

03-06T00:00:53.615-0500: 181819.816: [GC [1 CMS-initial-mark: 3287517K(4184064K)] 3444116K(7231488K), 0.0111440 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]


占用率仅针对旧空间进行计算。您的旧空间利用率为4184064K中的3287517K。

关于java - Java 1.7-在达到CMSInitiatingOccupancyFraction之前启动CMS,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55025526/

10-10 09:45