Web Analytics Made Easy - Statcounter

Tools / Minecraft

Minecraft Server RAM & JVM Flags Calculator

Pick your player count and server type and get a recommended -Xmx plus a ready-to-paste startup command. Modern JVM defaults first, which is what Paper now recommends on a current Java runtime, with Aikar's tuned G1 flags beside it for when you actually have GC pauses to fix. Runs in your browser.

Recommended allocation: 6 GB

Start here (modern JVM defaults, Java 25):


    

Only if you see GC pauses (Aikar's tuned G1, ):


    

How the estimate works

RAM scales with what the server has to keep loaded: the world, the render/view distance, your plugins or mods, and the number of players. The calculator starts from a base for your server type, adds a per-player amount, and bumps it for a high view distance, then rounds to a sensible heap size. Treat it as a strong starting point, then watch your server's actual memory and timings and adjust.

The first command is just a heap size on a modern JVM, which is where Paper now tells you to start: run it, watch your tick time, and tune only against a problem you can see. The second is Aikar's flags, tuned G1 settings that keep pause times low by collecting in small steady increments, with -Xms equal to -Xmx and AlwaysPreTouch so the heap is reserved up front; at 12GB and above it switches to the large-heap variant automatically. They are worth reaching for on a big heap or a heavy pack, and are cargo cult on a small one.

Leave room outside the heap. The JVM's own overhead, native memory and the operating system live outside -Xmx, and Paper puts that at roughly 1 to 1.5 GB. That is a better rule than a flat percentage: on a small box it works out near the old 75% advice, and on a large one that advice reserves far more than anything needs.

Java version. Minecraft 26.1 and later require Java 25, and raised the default allocation from 2 GB to 4 GB. Versions up to 1.21.11 run on Java 21. Running 26.x on Java 21 fails at startup rather than degrading.

Right-sizing a server you actually rent?

Picking a plan is exactly this calculation - RAM for the world, the mods, and the players. The tool is free and needs no account; if you want a host where the plan tiers line up with these numbers, Supercraft is one option among many. See also our modpack sizing guide.

Frequently asked questions

How much RAM does a Minecraft server need?

A small vanilla or Paper server runs well on 2-4GB. Plugin servers want 4-6GB; light modpacks 6-8GB; large modpacks 8-12GB or more. RAM scales with world size, render/view distance, plugins or mods, and player count - this calculator estimates a sensible -Xmx from those inputs.

What are Aikar's flags and do I need them?

Aikar's flags are a tuned set of G1 garbage-collector JVM options that smooth out lag spikes. They are not a default any more. Paper's own guidance on a modern Java runtime is to start with no extra flags and tune only against an observed problem, because G1 defaults have improved a great deal since those flags were written, and Minecraft 26.1 moved its own default collector from G1 to ZGC where the system supports it. This tool gives you the plain command first and the tuned one beside it, sized to your heap.

Should -Xms and -Xmx be the same value?

Yes, for a dedicated game server. Setting the minimum (-Xms) equal to the maximum (-Xmx) with -XX:+AlwaysPreTouch reserves the heap up front and avoids resize pauses. This tool sets them equal in the generated command.

Can I give the server all my machine's RAM?

No. The heap is not the whole cost: the JVM itself, native memory and the operating system all need room outside -Xmx. Paper puts that overhead at roughly 1 to 1.5 GB, which is a more useful rule than a flat percentage because it does not scale with machine size. On a 4 GB box a 75 percent rule leaves 1 GB and is about right; on a 64 GB box it leaves 16 GB you did not need to reserve.

This tool: v1.11 · updated 18 Sep 2026