服务器频繁fullGC,求调优办法

wedsy120 2015-07-21 10:51:44
服务器一直报CPU饥饿,经过查看GC日志发现系统频繁出现full GC,求教各位大大,如何进行调优?
服务器配置: 8C48G
jvm参数:-Xss1m -Xgcpolicy:optavgpause -Xmns256m -Xmnx512m -Xjit:codetotal=131072 -Xgcthreads2 -Xloamaximum0.2 -Xverbosegclog:${SERVER_LOG_ROOT}/verbosegc.log,20,50000 -Ddefault.client.encoding=UTF-8 -Dfile.encoding=UTF-8 -Duser.language=Zh -Duser.region=UTF-8
最大堆大小设置:16G 初始堆大小:8G
附一段GC日志如下:
<con event="completed full sweep" timestamp="Jul 21 09:39:56 2015">
<stats sweepbytes="0" sweeptime="0.137" connectbytes="1071644672" connecttime="0.404" />
</con>
<con event="final card cleaning">
<stats cardscleaned="246365" traced="214280148" durationms="961.201" />
</con>
<gc type="global" id="6791" totalid="6791" intervalms="144892.522">
<finalization objectsqueued="419" />
<timesms mark="359.271" sweep="0.182" compact="0.000" total="360.584" />
<tenured freebytes="1661855104" totalbytes="17177772032" percent="9" >
<soa freebytes="1661855104" totalbytes="17177772032" percent="9" />
<loa freebytes="0" totalbytes="0" percent="0" />
</tenured>
</gc>
<tenured freebytes="1661855104" totalbytes="17177772032" percent="9" >
<soa freebytes="1661855104" totalbytes="17177772032" percent="9" />
<loa freebytes="0" totalbytes="0" percent="0" />
</tenured>
<refs soft="5194" weak="570816" phantom="2117" dynamicSoftReferenceThreshold="3" maxSoftReferenceThreshold="32" />
<time totalms="1323.670" />
</con>

<con event="completed sweep" timestamp="Jul 21 09:39:57 2015">
<stats bytes="0" time="0.002" />
</con>

<con event="kickoff" timestamp="Jul 21 09:39:57 2015">
<kickoff reason="Kickoff threshold reached" />
<stats tenurefreebytes="753834800" tracetarget="10256393073" kickoff="1392678656" />
</con>
...全文
514 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
full GC 说明对象占用内存没有释放,导致新对象申请内存出现内存不足的情况,系统强制GC。检查代码。
呵呵一笑哈 2015-07-21
  • 打赏
  • 举报
回复
其实我比较想知道你们的服务器负荷多少,为啥不再开个服务器分摊请求?如果请求少的话,先不说服务器设置怎么样,代码里该销毁的对象设成null了么?

25,985

社区成员

发帖
与我相关
我的任务
社区描述
高性能WEB开发
社区管理员
  • 高性能WEB开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧