Minecraft JVM Flag Generator
Generate practical Minecraft server JVM flags for Paper, Purpur, Forge, Fabric, and Velocity with sensible heap sizing and GC reminders.
Generate JVM Flags
Use the generator as a starting point, then test during real player activity. JVM flags are not a substitute for profiling, plugin audits, sensible distances, or a good host.
When to Use Conservative Flags
Use conservative flags when you are recovering from a crash, changing Java versions, testing a new host, or comparing a panel startup command against SSH. Once the server is stable, tune carefully.
If a server fails before loading plugins, first test a minimal command:
java -Xms2G -Xmx2G -jar server.jar nogui
Then rebuild the startup command here. If exit code 1 returns, use the exit code 1 guide to find the first exception.
Keep Memory Realistic
Too little memory causes pressure. Too much memory can create longer pauses and hide the real workload. Leave memory for the operating system, panel, databases, proxy, backups, and file cache.
What to Check After Changing Flags
After updating flags, watch:
- Startup success.
- Heap usage under normal player count.
- Garbage collection pauses.
- TPS and MSPT during busy periods.
- Plugin or mod startup errors.
If TPS stays low while memory looks healthy, the problem is probably entities, chunks, plugins, or CPU. Start with the TPS drops guide.
FAQ
Should Xms and Xmx be the same?
For most dedicated Minecraft server processes, matching Xms and Xmx keeps heap sizing predictable.
Will flags fix low TPS?
Flags can reduce garbage collection problems, but low TPS often comes from CPU load, entities, chunks, or plugins.
How much memory should I choose?
Choose enough for your version, worlds, mods, and player count, then profile. Do not use all machine memory for the Java heap.
Related Tools
Startup Log Classifier
Paste a Minecraft startup log excerpt to classify Java mismatch, port conflicts, memory errors, plugin failures, dependency issues, and TPS overload.
server.properties Generator
Generate a clean Minecraft server.properties baseline for online mode, max players, difficulty, view distance, simulation distance, and command blocks.
Java Version Compatibility Tool
Check the Java version needed for common Minecraft server version ranges and avoid UnsupportedClassVersionError plugin and server startup failures.
Related Articles
Fix Minecraft Server Exit Code 1
Troubleshoot Minecraft server exit code 1 by reading the first exception, checking Java, plugin versions, startup flags, configs, and host panels.
Fix Minecraft Server TPS Drops
Fix Minecraft server TPS drops by profiling Spark, checking MSPT, entities, chunks, plugin tasks, view distance, memory, and hosting limits.
How to Fix Can't Keep Up Is the Server Overloaded
Fix Minecraft Can't Keep Up server overloaded warnings by checking TPS, MSPT, Spark profiles, chunks, entities, plugins, world saves, and hosting limits.