JDK 1.8相关参数变化

本文就具体日志说明升级到JDK1.8后一些参数失效的解决方法。
-server -Xms6G -Xmx6G -XX:+DisableExplicitGC -verbose:gc -Xloggc:/home/app/log/gc.%t.log -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCTaskTimeStamps -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:PermSize=128m -XX:MaxPermSize=128m -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8 -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:ParallelGCThreads=19 -XX:ConcGCThreads=19 -XX:-UseGCOverheadLimit -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSFullGCsBeforeCompaction=1 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSMaxAbortablePrecleanTime=6000 -XX:CompileThreshold=10 -XX:MaxInlineSize=1024 -Dsun.net.client.defaultConnectTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.ttl=300 -Djsse.enableCBCProtection=false -Dtomcat.logs.dir=/home/app/log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/app/app-Djava.security.egd=file:/dev/./urandom”

在使用以上参数启动JDK1.8,以达到优化效果时,会出现日志:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release. Java HotSpot(TM) 64-Bit Server VM warning: CMSFullGCsBeforeCompaction is deprecated and will likely be removed in a future release.

PermSize在1.8中已不再支持,解决:替换为MetaspaceSize;
MaxPermSize在1.8中已不再支持,解决:替换为MaxMetaspaceSize;

 

UseCMSCompactAtFullCollection:在jvm1.8起已弃用前端回收模式,改为只用整体垃圾回收,此标识已无意义。

CMSFullGCsBeforeCompaction::在jvm1.8起已弃用前端回收模式,改为只用整体垃圾回收,此标识已无意义。

以上见官方通知

参考:JDK1.8的兼容性指南

 

Comments

So empty here ... leave a comment!

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Sidebar