Optimizing Sponge Server

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.

Hello, I don’t know much about the java flags but have you seen this post?
https://forums.spongepowered.org/t/optimized-startup-flags-for-consistent-garbage-collection/13239

1 Like

They probably saw that post since they’re using the same java flags.

1 Like

My post linked above details why to set xms to xmx.

G1 does work better with more memory up until the point of diminishing returns.

4 Likes