Direct answer

For Paper, start with the current Paper documentation and its script/flag guidance instead of combining multiple Reddit flag lists. Keep -Xmx below total machine/container memory and avoid changing collectors because a random post says one is “faster.”

Xms and Xmx

-Xmx is the maximum Java heap. -Xms is the initial heap. The correct values depend on your server and hosting environment. Leaving headroom outside the heap is mandatory for a stable system.

Garbage collector flags

Paper's Aikar-flags documentation uses G1GC tuning and is still maintained as a Paper reference. Modern Java also evolves over time, so a flag copied from an old Java 8 or Java 17 guide may be irrelevant or harmful on newer runtimes.

Do not expect flags to fix game workload

If spark shows 70% of tick time in mob AI, changing GC flags cannot remove that AI cost. JVM tuning is most relevant when GC behavior itself is causing measurable pauses or when you need predictable heap behavior.

Change flags conservatively

Save your current startup command, verify the Java version required by the server software, change one flag set at a time, and compare spark/GC data under similar load.

References

These sources were checked while preparing this article. Performance behavior and configuration can change between Minecraft/server-software versions, so verify version-specific settings before applying them.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000