Hey. I’ve been actively studying Java flags for a week now, but I’m still a beginner in this field.
I would like to receive a justification to observe the same values of xmx
and xms
. Some say this improves performance, because GC needs to do less work. Some do not see any difference. Can someone explain this to me?
Now I’m using G1GC with the following flags:
java
-Xms8G -Xmx16G
-XX:+UseG1GC
-XX:+UnlockExperimentalVMOptions
-XX:MaxGCPauseMillis=100
-XX:+DisableExplicitGC
-XX:TargetSurvivorRatio=90
-XX:G1NewSizePercent=50
-XX:G1MaxNewSizePercent=80
-XX:InitiatingHeapOccupancyPercent=10
-XX:G1MixedGCLiveThresholdPercent=50
-XX:+AggressiveOpts
-XX:+AlwaysPreTouch
-jar spongecore.jar
P.S. Sorry if grammatical errors are allowed. My English is at the basic level.