your current location:首页 > news>A [Obvious Effect] Java 8 Optimized JVM Parameter [MC] My Minecraft GAME

A [Obvious Effect] Java 8 Optimized JVM Parameter [MC] My Minecraft GAME

2024-12-10 17:56:57|Myriagame |source:minecraft skins

This tutorial is set by the author to use the CC By-NC-SA protocol.

This set of parameters was summarized by various posts on the discussion of JVM parameters in China and foreign countries for a long time. The parameters are as follows:

-D64 -XX:+Aggressiveopts -XX:+UseConcmarksweepgc -XX:+USEPARNEWGC -XX:+CMSCONCURRENTMTENABLED -XX: Parallelgcthreads = 8 -DSUN.RMI.DGC.Ser VER.GCINTERVAL = 3600000 -XX:+UnlockexperentalVMOPTIONS -XX:+ExplicitgCinvoSconcurrent-XX: maxGCPAUSEMILIS = 50 -XX:+AlwaySpretouch -XX:+UsestringDedupation -DFML.IGNOREPANCREPANCIES = TRUE -DFML.IGNORINVALIDMIDMINECRAF Tcertifications = True -XX: -MitStacktraceInfastthrow -XX:+OptimizeStringconcat -XX:+UseAdaptiveGCBoundDary -XX: Newratio = 3-Dfml.readtimeout = 90 -XX:+UsefastaccessOthlets

Note that some promoters will add the optimized parameters of the G1GC with their own. After adding this parameter, it will cause the parameter conflict and cannot start the game.Solution: Find the button to find your starter if you close the default parameter. If you have it, turn it off.(For example, there is a button below the place where the HMCL filling is filled in the number of "no default JVM optimization parameters". Only when you open it can you start the game.)

After the above steps are performed, if you find that the memory is not used in the starter, please add -xms10240m -xmx10240m parameters to the front of the parameter, and change the 10240M of it to the value you want to allocate.

It is recommended to use Sampler to use the/Sampler GC command manual GC (memory cleaning). Since the -xx:+ExplitGcinvokesconcurrent parameters are used, such an explicit GC call will not stuck your game, and can release a large amount of memory.

In addition, it is recommended to install foamfix to reduce memory occupation

It is only suitable for the HOTSPOT version of Java 8 8U271. It is not tested in other versions. OpenJ9 compatibility is unknown. If there is a problem, please update the Java to 8u271.

Actual measured 1.12 500+ module integration package. Compared with the common optimization parameters using G1GC, this set of parameters can greatly reduce the stalemine and frame jump situation, and the average frame number is increased by about 10.At the same time, memory occupation has also been increased (the memory of the division is more useful), but it seems that the amount of memory will not significantly reduce the frame rate when the memory is full. Try to allocate 6G memory into the game.It can also maintain the high frame rate without running the frame.

A small bug: When using this parameter, there is a certain probability that some game models are lost (such as maid hand -organized, wireless synthetic terminals). After a period of time or switching dimension, it will return to normal.