模组作者原话:IMPORTANT: THIS MOD IS NOT FOR EVERYONE! Only use this if you are experiencing lag caused by high RAM usage (Which usually happens on very large modpacks) or experiencing crashes caused by OutOfMemoryError. Otherwise this mod will negatively affect your game experience, because explicit gc takes time and it brings no benefit if your RAM is abundant. 翻译:只适用于大型整合包和低配机 如果你的内存足够,他只会带来不必要的卡顿! 只适用于客户端! 如果你的内存足够,请把他禁用或移除 此模组会自动使用System.gc()去清除内存,但是由于explicit gc会使游戏卡住一小会,所以他会在玩家静止时或内存超过特定值时清理内存 你也可以使用 /cleanmemory命令 作者推荐使用以下jvm参数,可以在清理内存时不卡顿 XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:ParallelGCThreads=4 -Dsun.rmi.dgc.server.gcInterval=1800000 -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:MaxGCPauseMillis=50 -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:-OmitStackTraceInFastThrow -XX:+OptimizeStringConcat -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 -Dfml.readTimeout=90 -XX:+UseFastAccessorMethods 如果你要使用此参数 请将hmcl设置中的“不添加默认的JVM优化参数”打开否则无法启动游戏 如果发现在启动器中更改内存没有用,请在参数的最前面加上-Xms10240M -Xmx10240M 两个参数,并将其中的10240M改为你要分配的值。 OpenJ9兼容性未知,仅在Java 8 8u271测试 如果你发现使用此参数后无法启动游戏请删除并将“不添加默认的JVM优化参数”关闭 |