Ignoring option PermSize、MaxPermSize; support was removed in 8.0的解决办法
今天和小伙伴们研究算法,在验证数据的时候需要将数据加大到百万级别来计算,当将循环体增加大100w级别的时候,出现了OutOfMemory的错误。显然,默认的jvm内存已经承载不了100w级别的数据,需要将jvm的堆内存加大。
在eclipse中设置JVM内存
步骤1:右键-->edit configure-->jvm option,在输入框中粘贴下面代码:
-Xmx4000M -Xms4000M -Xmn600M -XX:PermSize=500M -XX:MaxPermSize=500M -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=1 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:+CMSClassUnloadingEnabled -XX:LargePageSizeInBytes=128M -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0
步骤2:点击apply--->apply/close
点击后出现如下错误:
64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: Ignoring option PermSize; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Unrecognized VM option 'UseConcMarkSweepGC'
从英文的错误信息上我们很容易得到有效信息:相关的标签已经Ignoring,在jdk8.0中已经被移除。
找到原因以后,我们很快就能到解决方案。既然相关的设置参数已经被移除,那么我们在设置的时候将相关的属性移除掉,再点击apply后再也没有报错。
以上问题顺利得到解决。