Closed QianFuv closed 3 months ago
75% memory is fairly normal with large packs. The more memory you give Java, the more memory it will use. Then when it needs to garbage collect, it will use old generation pauses which cause stutter.
The original Aikar's Flags has flags for greater than 12GB if you absolutely need them,
-XX:G1NewSizePercent=40
-XX:G1MaxNewSizePercent=50
-XX:G1HeapRegionSize=16M
-XX:G1ReservePercent=15
-XX:InitiatingHeapOccupancyPercent=20
I realize that there are some differences between the parameters of Aikar and those you provided. Can you give me some suggestions for modifying your parameters?
I just copied them from aikar.co in the 12GB+ section
https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft "If you are using an Xmx value greater than 12G"
75% memory is fairly normal with large packs. The more memory you give Java, the more memory it will use. Then when it needs to garbage collect, it will use old generation pauses which cause stutter.
The original Aikar's Flags has flags for greater than 12GB if you absolutely need them,
* `-XX:G1NewSizePercent=40` * `-XX:G1MaxNewSizePercent=50` * `-XX:G1HeapRegionSize=16M` * `-XX:G1ReservePercent=15` * `-XX:InitiatingHeapOccupancyPercent=20` * NOTICE: If you see increase in old generation collections after this, revert back to the base flags!
This seems like the best bet for increasing to 16 gb but also read this if you are using these flags for the client: https://github.com/Mukul1127/Minecraft-Performance-Flags-Benchmarks#client-g1gc
These are the startup parameters I am currently using:
I'm using a 600+mod modpack, allocating 12GB of memory and using GraalvmJDK21. The memory usage is between 70% to 80%, which I believe is not an ideal state. Therefore, I decided to increase the allocated memory to 16GB. However, with the current startup parameters, it easily leads to crashes due to memory overflow. I think I need to modify some of these parameters in order to adapt them for the 16GB memory situation. Unfortunately, I am not well-versed in this area of knowledge, so I come here seeking assistance.š„°I hope to receive some advice!