性能问答>CMS一直在FULL GC该怎么解决呢>
1回复
4年前

CMS一直在FULL GC该怎么解决呢



项目运行一段时间,在一次推送后,大量用户请求进来,然后就发现CPU内存飙高,老年代达到CMS GC70%阈值,但是一直无法回收,看GC LOG也是一直在重复CMS GC,想请教一下这种是什么问题呢?该如何解决。
下面是JVM启动参数和部分GC LOG,JDK是1.8,服务是用的Jetty。

java -server -XX:+PrintCommandLineFlags -verbose:gc -Xloggc:../gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../ -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSClassUnloadingEnabled -Xms1500m -Xmx1500m -Xmn600m   -jar front.jar
2020-11-18T10:06:21.372+0800: 200608.238: [GC (CMS Initial Mark) [1 CMS-initial-mark: 675854K(921600K)] 798654K(1474560K), 0.0582673 secs] [Times: user=0.12 sys=0.00, real=0.06 secs] 
2020-11-18T10:06:21.431+0800: 200608.297: [CMS-concurrent-mark-start]
2020-11-18T10:06:22.589+0800: 200609.455: [CMS-concurrent-mark: 1.157/1.157 secs] [Times: user=1.11 sys=0.00, real=1.16 secs] 
2020-11-18T10:06:22.589+0800: 200609.455: [CMS-concurrent-preclean-start]
2020-11-18T10:06:22.599+0800: 200609.465: [CMS-concurrent-preclean: 0.009/0.010 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] 
2020-11-18T10:06:22.599+0800: 200609.465: [CMS-concurrent-abortable-preclean-start]
 CMS: abort preclean due to time 2020-11-18T10:06:27.620+0800: 200614.486: [CMS-concurrent-abortable-preclean: 4.204/5.021 secs] [Times: user=4.19 sys=0.00, real=5.02 secs] 
2020-11-18T10:06:27.626+0800: 200614.492: [GC (CMS Final Remark) [YG occupancy: 209387 K (552960 K)]200614.492: [Rescan (parallel) , 0.1436358 secs]200614.636: [weak refs processing, 0.0002145 secs]200614.636: [class unloading, 0.0824228 secs]200614.719: [scrub symbol table, 0.0518728 secs]200614.771: [scrub string table, 0.0053486 secs][1 CMS-remark: 675854K(921600K)] 885241K(1474560K), 0.2896960 secs] [Times: user=0.37 sys=0.00, real=0.29 secs] 
2020-11-18T10:06:27.917+0800: 200614.783: [CMS-concurrent-sweep-start]
2020-11-18T10:06:28.179+0800: 200615.045: [CMS-concurrent-sweep: 0.262/0.262 secs] [Times: user=0.30 sys=0.00, real=0.27 secs] 
2020-11-18T10:06:28.180+0800: 200615.046: [CMS-concurrent-reset-start]
2020-11-18T10:06:28.182+0800: 200615.048: [CMS-concurrent-reset: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 
2020-11-18T10:06:30.185+0800: 200617.052: [GC (CMS Initial Mark) [1 CMS-initial-mark: 675623K(921600K)] 911817K(1474560K), 0.1449234 secs] [Times: user=0.24 sys=0.00, real=0.15 secs] 
2020-11-18T10:06:30.332+0800: 200617.198: [CMS-concurrent-mark-start]
2020-11-18T10:06:31.577+0800: 200618.443: [CMS-concurrent-mark: 1.245/1.245 secs] [Times: user=1.15 sys=0.00, real=1.24 secs] 
2020-11-18T10:06:31.577+0800: 200618.443: [CMS-concurrent-preclean-start]
2020-11-18T10:06:31.587+0800: 200618.453: [CMS-concurrent-preclean: 0.010/0.010 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
2020-11-18T10:06:31.587+0800: 200618.453: [CMS-concurrent-abortable-preclean-start]
 CMS: abort preclean due to time 2020-11-18T10:06:36.763+0800: 200623.629: [CMS-concurrent-abortable-preclean: 4.156/5.176 secs] [Times: user=4.52 sys=0.00, real=5.18 secs] 
2020-11-18T10:06:36.772+0800: 200623.639: [GC (CMS Final Remark) [YG occupancy: 325087 K (552960 K)]200623.651: [Rescan (parallel) , 0.2062870 secs]200623.857: [weak refs processing, 0.0001323 secs]200623.858: [class unloading, 0.1036519 secs]200623.961: [scrub symbol table, 0.0425967 secs]200624.004: [scrub string table, 0.0047966 secs][1 CMS-remark: 675623K(921600K)] 1000710K(1474560K), 0.3768958 secs] [Times: user=0.51 sys=0.00, real=0.38 secs] 
2020-11-18T10:06:37.156+0800: 200624.022: [CMS-concurrent-sweep-start]
2020-11-18T10:06:37.472+0800: 200624.338: [CMS-concurrent-sweep: 0.316/0.316 secs] [Times: user=0.27 sys=0.00, real=0.32 secs] 
2020-11-18T10:06:37.474+0800: 200624.340: [CMS-concurrent-reset-start]
2020-11-18T10:06:37.476+0800: 200624.342: [CMS-concurrent-reset: 0.002/0.002 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
2020-11-18T10:06:39.482+0800: 200626.348: [GC (CMS Initial Mark) [1 CMS-initial-mark: 675622K(921600K)] 1031728K(1474560K), 0.2227259 secs] [Times: user=0.37 sys=0.00, real=0.22 secs] 
2020-11-18T10:06:39.706+0800: 200626.572: [CMS-concurrent-mark-start]
2020-11-18T10:06:40.796+0800: 200627.662: [CMS-concurrent-mark: 1.090/1.090 secs] [Times: user=1.13 sys=0.00, real=1.09 secs] 
2020-11-18T10:06:40.796+0800: 200627.662: [CMS-concurrent-preclean-start]
2020-11-18T10:06:40.805+0800: 200627.671: [CMS-concurrent-preclean: 0.008/0.008 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
2020-11-18T10:06:40.805+0800: 200627.671: [CMS-concurrent-abortable-preclean-start]
 CMS: abort preclean due to time 2020-11-18T10:06:45.836+0800: 200632.702: [CMS-concurrent-abortable-preclean: 3.797/5.031 secs] [Times: user=3.85 sys=0.00, real=5.03 secs] 
2020-11-18T10:06:45.840+0800: 200632.706: [GC (CMS Final Remark) [YG occupancy: 435072 K (552960 K)]200632.706: [Rescan (parallel) , 0.3199932 secs]200633.026: [weak refs processing, 0.0001198 secs]200633.027: [class unloading, 0.0878554 secs]200633.114: [scrub symbol table, 0.0440129 secs]200633.159: [scrub string table, 0.0037187 secs][1 CMS-remark: 675622K(921600K)] 1110694K(1474560K), 0.4623376 secs] [Times: user=0.64 sys=0.00, real=0.46 secs] 
2020-11-18T10:06:46.304+0800: 200633.170: [CMS-concurrent-sweep-start]
2020-11-18T10:06:46.591+0800: 200633.457: [CMS-concurrent-sweep: 0.283/0.287 secs] [Times: user=0.35 sys=0.00, real=0.29 secs] 
2020-11-18T10:06:46.591+0800: 200633.457: [CMS-concurrent-reset-start]
2020-11-18T10:06:46.593+0800: 200633.459: [CMS-concurrent-reset: 0.002/0.002 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
3403 阅读
请先登录,查看1条精彩评论吧
快去登录吧,你将获得
  • 浏览更多精彩评论
  • 和开发者讨论交流,共同进步