我有基于Spring的小型Web服务器。有时我发现GC几乎没有任何理由开始工作。有时GC工作很长一段时间,有时几小时后几乎不能工作。请帮助我找出为什么GC很难工作,为什么GC (CMS Initial Mark)
会发生?
常见信息:
Java HotSpot(TM) 64-Bit Server VM (25.60-b23) for linux-amd64 JRE (1.8.0_60-b27), built on Aug 4 2015 12:19:40 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)
Memory: 4k page, physical 14231888k(40224k free), swap 4194300k(3411224k free)
CommandLine flags: -XX:+CITime -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError -XX:InitialHeapSize=268435456 -XX:+ManagementServer -XX:MaxHeapSize=268435456 -XX:MaxMetaspaceSize=314572800 -XX:MaxNewSize=178257920 -XX:NewSize=178257920 -XX:OldPLABSize=16 -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError=./oom_happens.sh -XX:+OptimizeStringConcat -XX:+PrintCommandLineFlags -XX:+PrintConcurrentLocks -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution -XX:SurvivorRatio=10 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
日志(服务器在1.5小时内正常工作,然后每2秒启动GC (CMS Initial Mark)
)
2017-02-04T10:39:26.525+0200: 5.908: [GC (Allocation Failure) 2017-02-04T10:39:26.525+0200: 5.908: [ParNew: 145152K->14464K(159616K), 0.0265192 secs] 145152K->17461K(247680K), 0.0266811 secs] [Times: user=0.06 sys=0.02, real=0.02 secs]
2017-02-04T10:39:26.553+0200: 5.936: [GC (CMS Initial Mark) [1 CMS-initial-mark: 2997K(88064K)] 19347K(247680K), 0.0029504 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2017-02-04T10:39:26.556+0200: 5.939: [CMS-concurrent-mark-start]
2017-02-04T10:39:26.558+0200: 5.941: [CMS-concurrent-mark: 0.002/0.002 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2017-02-04T10:39:26.558+0200: 5.941: [CMS-concurrent-preclean-start]
2017-02-04T10:39:26.559+0200: 5.942: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T10:39:26.559+0200: 5.942: [GC (CMS Final Remark) [YG occupancy: 16350 K (159616 K)]2017-02-04T10:39:26.559+0200: 5.942: [Rescan (parallel) , 0.0067469 secs]2017-02-04T10:39:26.566+0200: 5.949: [weak refs processing, 0.0001010 secs]2017-02-04T10:39:26.566+0200: 5.949: [class unloading, 0.0040362 secs]2017-02-04T10:39:26.570+0200: 5.953: [scrub symbol table, 0.0037057 secs]2017-02-04T10:39:26.574+0200: 5.957: [scrub string table, 0.0005995 secs][1 CMS-remark: 2997K(88064K)] 19347K(247680K), 0.0164263 secs] [Times: user=0.05 sys=0.00, real=0.02 secs]
2017-02-04T10:39:26.576+0200: 5.959: [CMS-concurrent-sweep-start]
2017-02-04T10:39:26.576+0200: 5.959: [CMS-concurrent-sweep: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T10:39:26.576+0200: 5.959: [CMS-concurrent-reset-start]
2017-02-04T10:39:26.577+0200: 5.960: [CMS-concurrent-reset: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T10:39:29.153+0200: 8.536: [GC (Allocation Failure) 2017-02-04T10:39:29.153+0200: 8.536: [ParNew: 159616K->14463K(159616K), 0.1512181 secs] 162593K->29998K(247680K), 0.1513519 secs] [Times: user=0.51 sys=0.04, real=0.16 secs]
2017-02-04T10:39:30.931+0200: 10.314: [GC (Allocation Failure) 2017-02-04T10:39:30.931+0200: 10.314: [ParNew: 159615K->11563K(159616K), 0.0257815 secs] 175150K->31143K(247680K), 0.0259213 secs] [Times: user=0.09 sys=0.01, real=0.03 secs]
2017-02-04T10:39:30.957+0200: 10.340: [GC (CMS Initial Mark) [1 CMS-initial-mark: 19580K(88064K)] 33550K(247680K), 0.0024182 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]
2017-02-04T10:39:30.960+0200: 10.343: [CMS-concurrent-mark-start]
2017-02-04T10:39:30.974+0200: 10.357: [CMS-concurrent-mark: 0.011/0.014 secs] [Times: user=0.07 sys=0.00, real=0.01 secs]
2017-02-04T10:39:30.974+0200: 10.357: [CMS-concurrent-preclean-start]
2017-02-04T10:39:30.975+0200: 10.358: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
2017-02-04T10:39:30.975+0200: 10.358: [CMS-concurrent-abortable-preclean-start]
2017-02-04T10:39:32.459+0200: 11.841: [CMS-concurrent-abortable-preclean: 1.179/1.484 secs] [Times: user=5.31 sys=0.14, real=1.48 secs]
2017-02-04T10:39:32.460+0200: 11.843: [GC (CMS Final Remark) [YG occupancy: 85694 K (159616 K)]2017-02-04T10:39:32.460+0200: 11.843: [Rescan (parallel) , 0.0152197 secs]2017-02-04T10:39:32.475+0200: 11.858: [weak refs processing, 0.0001992 secs]2017-02-04T10:39:32.475+0200: 11.858: [class unloading, 0.0129920 secs]2017-02-04T10:39:32.488+0200: 11.871: [scrub symbol table, 0.0085933 secs]2017-02-04T10:39:32.497+0200: 11.880: [scrub string table, 0.0011467 secs][1 CMS-remark: 19580K(88064K)] 105275K(247680K), 0.0408012 secs] [Times: user=0.17 sys=0.00, real=0.04 secs]
2017-02-04T10:39:32.501+0200: 11.884: [CMS-concurrent-sweep-start]
2017-02-04T10:39:32.510+0200: 11.893: [CMS-concurrent-sweep: 0.009/0.009 secs] [Times: user=0.06 sys=0.00, real=0.01 secs]
2017-02-04T10:39:32.511+0200: 11.893: [CMS-concurrent-reset-start]
2017-02-04T10:39:32.511+0200: 11.894: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T10:39:53.578+0200: 32.961: [GC (Allocation Failure) 2017-02-04T10:39:53.578+0200: 32.961: [ParNew: 156715K->14464K(159616K), 0.0240020 secs] 169572K->39556K(247680K), 0.0241637 secs] [Times: user=0.10 sys=0.01, real=0.02 secs]
2017-02-04T11:37:31.683+0200: 3491.066: [GC (Allocation Failure) 2017-02-04T11:37:31.700+0200: 3491.083: [ParNew (promotion failed): 159616K->159616K(159616K), 0.3959455 secs]2017-02-04T11:37:32.096+0200: 3491.479: [CMS: 85218K->80326K(88064K), 0.8836177 secs] 184708K->80326K(247680K), [Metaspace: 52323K->52323K(1095680K)], 1.3085194 secs] [Times: user=1.16 sys=0.16, real=1.31 secs]
2017-02-04T11:37:32.992+0200: 3492.375: [GC (CMS Initial Mark) [1 CMS-initial-mark: 80326K(88064K)] 80930K(247680K), 0.0013563 secs] [Times: user=0.00 sys=0.01, real=0.00 secs]
2017-02-04T11:37:32.994+0200: 3492.377: [CMS-concurrent-mark-start]
2017-02-04T11:37:33.014+0200: 3492.397: [CMS-concurrent-mark: 0.019/0.020 secs] [Times: user=0.10 sys=0.00, real=0.02 secs]
2017-02-04T11:37:33.014+0200: 3492.397: [CMS-concurrent-preclean-start]
2017-02-04T11:37:33.018+0200: 3492.401: [CMS-concurrent-preclean: 0.003/0.004 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T11:37:33.018+0200: 3492.401: [CMS-concurrent-abortable-preclean-start]
CMS: abort preclean due to time 2017-02-04T11:37:38.021+0200: 3497.404: [CMS-concurrent-abortable-preclean: 0.047/5.002 secs] [Times: user=0.06 sys=0.00, real=5.00 secs]
2017-02-04T11:37:38.021+0200: 3497.404: [GC (CMS Final Remark) [YG occupancy: 2415 K (159616 K)]2017-02-04T11:37:38.021+0200: 3497.404: [Rescan (parallel) , 0.0021945 secs]2017-02-04T11:37:38.023+0200: 3497.406: [weak refs processing, 0.0002833 secs]2017-02-04T11:37:38.024+0200: 3497.407: [class unloading, 0.0153559 secs]2017-02-04T11:37:38.039+0200: 3497.422: [scrub symbol table, 0.0094751 secs]2017-02-04T11:37:38.049+0200: 3497.432: [scrub string table, 0.0012238 secs][1 CMS-remark: 80326K(88064K)] 82742K(247680K), 0.0295518 secs] [Times: user=0.04 sys=0.01, real=0.03 secs]
2017-02-04T11:37:38.051+0200: 3497.434: [CMS-concurrent-sweep-start]
2017-02-04T11:37:38.116+0200: 3497.499: [CMS-concurrent-sweep: 0.065/0.065 secs] [Times: user=0.04 sys=0.01, real=0.07 secs]
2017-02-04T11:37:38.116+0200: 3497.499: [CMS-concurrent-reset-start]
2017-02-04T11:37:38.117+0200: 3497.500: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T11:56:21.651+0200: 4621.034: [GC (CMS Initial Mark) [1 CMS-initial-mark: 38594K(88064K)] 88260K(247680K), 0.0199247 secs] [Times: user=0.06 sys=0.02, real=0.02 secs]
2017-02-04T11:56:21.671+0200: 4621.054: [CMS-concurrent-mark-start]
2017-02-04T11:56:21.690+0200: 4621.072: [CMS-concurrent-mark: 0.018/0.018 secs] [Times: user=0.06 sys=0.02, real=0.02 secs]
2017-02-04T11:56:21.690+0200: 4621.073: [CMS-concurrent-preclean-start]
2017-02-04T11:56:21.692+0200: 4621.075: [CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T11:56:21.692+0200: 4621.075: [CMS-concurrent-abortable-preclean-start]
2017-02-04T11:56:21.692+0200: 4621.075: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T11:56:21.692+0200: 4621.075: [GC (CMS Final Remark) [YG occupancy: 49665 K (159616 K)]2017-02-04T11:56:21.692+0200: 4621.075: [Rescan (parallel) , 0.0056309 secs]2017-02-04T11:56:21.698+0200: 4621.081: [weak refs processing, 0.0004105 secs]2017-02-04T11:56:21.699+0200: 4621.081: [class unloading, 0.0272522 secs]2017-02-04T11:56:21.726+0200: 4621.109: [scrub symbol table, 0.0170628 secs]2017-02-04T11:56:21.743+0200: 4621.126: [scrub string table, 0.0017874 secs][1 CMS-remark: 38594K(88064K)] 88260K(247680K), 0.0533350 secs] [Times: user=0.10 sys=0.01, real=0.06 secs]
2017-02-04T11:56:21.746+0200: 4621.129: [CMS-concurrent-sweep-start]
2017-02-04T11:56:21.774+0200: 4621.157: [CMS-concurrent-sweep: 0.028/0.028 secs] [Times: user=0.02 sys=0.01, real=0.03 secs]
2017-02-04T11:56:21.774+0200: 4621.157: [CMS-concurrent-reset-start]
2017-02-04T11:56:21.774+0200: 4621.157: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:13.651+0200: 4913.034: [GC (CMS Initial Mark) [1 CMS-initial-mark: 25938K(88064K)] 88452K(247680K), 0.0116570 secs] [Times: user=0.10 sys=0.01, real=0.01 secs]
2017-02-04T12:01:13.663+0200: 4913.046: [CMS-concurrent-mark-start]
2017-02-04T12:01:13.684+0200: 4913.067: [CMS-concurrent-mark: 0.021/0.021 secs] [Times: user=0.07 sys=0.01, real=0.03 secs]
2017-02-04T12:01:13.684+0200: 4913.067: [CMS-concurrent-preclean-start]
2017-02-04T12:01:13.686+0200: 4913.069: [CMS-concurrent-preclean: 0.002/0.002 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
2017-02-04T12:01:13.687+0200: 4913.069: [CMS-concurrent-abortable-preclean-start]
2017-02-04T12:01:13.687+0200: 4913.069: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:13.687+0200: 4913.070: [GC (CMS Final Remark) [YG occupancy: 62514 K (159616 K)]2017-02-04T12:01:13.687+0200: 4913.070: [Rescan (parallel) , 0.0103963 secs]2017-02-04T12:01:13.698+0200: 4913.081: [weak refs processing, 0.0006922 secs]2017-02-04T12:01:13.698+0200: 4913.081: [class unloading, 0.0240702 secs]2017-02-04T12:01:13.722+0200: 4913.105: [scrub symbol table, 0.0147938 secs]2017-02-04T12:01:13.737+0200: 4913.120: [scrub string table, 0.0016158 secs][1 CMS-remark: 25938K(88064K)] 88452K(247680K), 0.0525941 secs] [Times: user=0.10 sys=0.02, real=0.05 secs]
2017-02-04T12:01:13.740+0200: 4913.123: [CMS-concurrent-sweep-start]
2017-02-04T12:01:13.754+0200: 4913.137: [CMS-concurrent-sweep: 0.014/0.014 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
2017-02-04T12:01:13.754+0200: 4913.137: [CMS-concurrent-reset-start]
2017-02-04T12:01:13.754+0200: 4913.137: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:15.754+0200: 4915.137: [GC (CMS Initial Mark) [1 CMS-initial-mark: 25872K(88064K)] 91296K(247680K), 0.0063790 secs] [Times: user=0.07 sys=0.00, real=0.00 secs]
2017-02-04T12:01:15.761+0200: 4915.144: [CMS-concurrent-mark-start]
2017-02-04T12:01:15.777+0200: 4915.160: [CMS-concurrent-mark: 0.016/0.016 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
2017-02-04T12:01:15.777+0200: 4915.160: [CMS-concurrent-preclean-start]
2017-02-04T12:01:15.778+0200: 4915.161: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:15.778+0200: 4915.161: [CMS-concurrent-abortable-preclean-start]
2017-02-04T12:01:15.778+0200: 4915.161: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:15.779+0200: 4915.162: [GC (CMS Final Remark) [YG occupancy: 65423 K (159616 K)]2017-02-04T12:01:15.779+0200: 4915.162: [Rescan (parallel) , 0.0060038 secs]2017-02-04T12:01:15.785+0200: 4915.168: [weak refs processing, 0.0002483 secs]2017-02-04T12:01:15.785+0200: 4915.168: [class unloading, 0.0122680 secs]2017-02-04T12:01:15.797+0200: 4915.180: [scrub symbol table, 0.0095177 secs]2017-02-04T12:01:15.807+0200: 4915.190: [scrub string table, 0.0012729 secs][1 CMS-remark: 25872K(88064K)] 91296K(247680K), 0.0303600 secs] [Times: user=0.10 sys=0.00, real=0.03 secs]
2017-02-04T12:01:15.809+0200: 4915.192: [CMS-concurrent-sweep-start]
2017-02-04T12:01:15.820+0200: 4915.203: [CMS-concurrent-sweep: 0.011/0.011 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2017-02-04T12:01:15.821+0200: 4915.203: [CMS-concurrent-reset-start]
2017-02-04T12:01:15.821+0200: 4915.204: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:17.820+0200: 4917.203: [GC (CMS Initial Mark) [1 CMS-initial-mark: 25872K(88064K)] 91296K(247680K), 0.0072830 secs] [Times: user=0.08 sys=0.01, real=0.01 secs]
2017-02-04T12:01:17.828+0200: 4917.211: [CMS-concurrent-mark-start]
2017-02-04T12:01:17.844+0200: 4917.227: [CMS-concurrent-mark: 0.016/0.016 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
2017-02-04T12:01:17.844+0200: 4917.227: [CMS-concurrent-preclean-start]
2017-02-04T12:01:17.845+0200: 4917.228: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:17.845+0200: 4917.228: [CMS-concurrent-abortable-preclean-start]
2017-02-04T12:01:17.845+0200: 4917.228: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:17.845+0200: 4917.228: [GC (CMS Final Remark) [YG occupancy: 65423 K (159616 K)]2017-02-04T12:01:17.845+0200: 4917.228: [Rescan (parallel) , 0.0059133 secs]2017-02-04T12:01:17.851+0200: 4917.234: [weak refs processing, 0.0002355 secs]2017-02-04T12:01:17.852+0200: 4917.234: [class unloading, 0.0125640 secs]2017-02-04T12:01:17.864+0200: 4917.247: [scrub symbol table, 0.0092922 secs]2017-02-04T12:01:17.873+0200: 4917.256: [scrub string table, 0.0012690 secs][1 CMS-remark: 25872K(88064K)] 91296K(247680K), 0.0303227 secs] [Times: user=0.10 sys=0.00, real=0.03 secs]
2017-02-04T12:01:17.876+0200: 4917.259: [CMS-concurrent-sweep-start]
2017-02-04T12:01:17.888+0200: 4917.271: [CMS-concurrent-sweep: 0.012/0.012 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2017-02-04T12:01:17.888+0200: 4917.271: [CMS-concurrent-reset-start]
2017-02-04T12:01:17.888+0200: 4917.271: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:19.888+0200: 4919.271: [GC (CMS Initial Mark) [1 CMS-initial-mark: 25872K(88064K)] 91543K(247680K), 0.0057390 secs] [Times: user=0.06 sys=0.00, real=0.00 secs]
2017-02-04T12:01:19.894+0200: 4919.277: [CMS-concurrent-mark-start]
2017-02-04T12:01:19.909+0200: 4919.292: [CMS-concurrent-mark: 0.016/0.016 secs] [Times: user=0.06 sys=0.00, real=0.02 secs]
2017-02-04T12:01:19.909+0200: 4919.292: [CMS-concurrent-preclean-start]
2017-02-04T12:01:19.910+0200: 4919.293: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:19.910+0200: 4919.293: [CMS-concurrent-abortable-preclean-start]
2017-02-04T12:01:19.910+0200: 4919.293: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:19.911+0200: 4919.294: [GC (CMS Final Remark) [YG occupancy: 65670 K (159616 K)]2017-02-04T12:01:19.911+0200: 4919.294: [Rescan (parallel) , 0.0060777 secs]2017-02-04T12:01:19.917+0200: 4919.300: [weak refs processing, 0.0002614 secs]2017-02-04T12:01:19.917+0200: 4919.300: [class unloading, 0.0122693 secs]2017-02-04T12:01:19.930+0200: 4919.312: [scrub symbol table, 0.0092923 secs]2017-02-04T12:01:19.939+0200: 4919.322: [scrub string table, 0.0012594 secs][1 CMS-remark: 25872K(88064K)] 91543K(247680K), 0.0302289 secs] [Times: user=0.10 sys=0.00, real=0.03 secs]
2017-02-04T12:01:19.944+0200: 4919.327: [CMS-concurrent-sweep-start]
2017-02-04T12:01:19.954+0200: 4919.337: [CMS-concurrent-sweep: 0.010/0.010 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
2017-02-04T12:01:19.954+0200: 4919.337: [CMS-concurrent-reset-start]
2017-02-04T12:01:19.954+0200: 4919.337: [CMS-concurrent-reset: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:21.954+0200: 4921.337: [GC (CMS Initial Mark) [1 CMS-initial-mark: 25872K(88064K)] 91543K(247680K), 0.0058778 secs] [Times: user=0.06 sys=0.00, real=0.00 secs]
2017-02-04T12:01:21.960+0200: 4921.343: [CMS-concurrent-mark-start]
2017-02-04T12:01:21.976+0200: 4921.359: [CMS-concurrent-mark: 0.016/0.016 secs] [Times: user=0.07 sys=0.00, real=0.02 secs]
2017-02-04T12:01:21.976+0200: 4921.359: [CMS-concurrent-preclean-start]
2017-02-04T12:01:21.977+0200: 4921.360: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:21.977+0200: 4921.360: [CMS-concurrent-abortable-preclean-start]
2017-02-04T12:01:21.977+0200: 4921.360: [CMS-concurrent-abortable-preclean: 0.000/0.000 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
2017-02-04T12:01:21.978+0200: 4921.361: [GC (CMS Final Remark) [YG occupancy: 65670 K (159616 K)]2017-02-04T12:01:21.978+0200: 4921.361: [Rescan (parallel) , 0.0060719 secs]2017-02-04T12:01:21.984+0200: 4921.367: [weak refs processing, 0.0002574 secs]2017-02-04T12:01:21.984+0200: 4921.367: [class unloading, 0.0128628 secs]2017-02-04T12:01:21.997+0200: 4921.380: [scrub symbol table, 0.0106592 secs]2017-02-04T12:01:22.008+0200: 4921.391: [scrub string table, 0.0012721 secs][1 CMS-remark: 25872K(88064K)] 91543K(247680K), 0.0322165 secs] [Times: user=0.10 sys=0.00, real=0.03 secs]
P.S。是的,我看到有几个GC (Allocation Failure)
,我明白为什么会这样。但我不明白为什么每2秒有GC (CMS Initial Mark)
:
2017-02-04T12:01:13.651+0200: 4913.034: [GC (CMS Initial Mark)
2017-02-04T12:01:15.754+0200: 4915.137: [GC (CMS Initial Mark)
2017-02-04T12:01:17.820+0200: 4917.203: [GC (CMS Initial Mark)
2017-02-04T12:01:19.888+0200: 4919.271: [GC (CMS Initial Mark)
2017-02-04T12:01:21.954+0200: 4921.337: [GC (CMS Initial Mark)
所以一个小时。