How Much RAM Does a Minecraft Server Need?
Real RAM requirements for a Minecraft server by player count, mods and server type — and why allocating more memory often makes performance worse.
"How much RAM do I need?" is the most common question in Minecraft server hosting, and the most commonly answered wrong. The honest answer is that RAM is rarely the thing limiting your server — but when it is, being short is brutal.
The short answer
| Setup | Heap to allocate |
|---|---|
| Vanilla / Paper, up to 10 players | 2–3 GB |
| Paper with plugins, 10–30 players | 4–6 GB |
| Paper, 30–80 players | 6–10 GB |
| Light modpack (50–100 mods) | 6–8 GB |
| Large modpack (200+ mods) | 10–16 GB |
| Modpack with 20+ players | 12–20 GB |
These are heap sizes (-Xmx), not machine sizes. Add 1–2 GB on top for the operating system and JVM overhead. A server you give 8 GB of heap to should live on a machine with at least 10 GB.
Why more RAM can make it slower
This is the part that surprises people.
Garbage collection pause time scales with the amount of live data the collector has to trace. A 24 GB heap that is mostly full takes longer to collect than a 12 GB heap that is mostly full. If your server would have been fine with 8 GB and you give it 24 GB, you have not made it faster — you have made each collection more expensive.
There is a real ceiling to useful heap size for Minecraft. Past roughly 12–16 GB, you should be tuning region sizes (see our guide on Aikar's flags) rather than adding more memory.
What actually limits a Minecraft server
In practice, most "my server is lagging" problems are not memory:
Single-thread CPU performance. Minecraft's main game loop runs on one thread. A CPU with a high clock speed and strong single-core performance matters far more than core count. A 16-core server with weak per-core performance will run worse than a 4-core server with a fast one.
Disk speed during chunk generation. Exploring a fresh world writes a lot of region files. On a spinning disk or an oversold shared drive, this shows up as periodic freezes that look exactly like a memory problem.
Plugins doing work on the main thread. A single plugin running a database query synchronously can cost you more tick time than any garbage collection setting.
How to tell whether RAM is your problem
You do not have to guess. Run the server and watch two things:
- Heap usage over time. If it climbs to your maximum, collects, and immediately climbs again — with frequent full collections — you are short on memory.
- Tick time pattern. Steady but high tick times point at CPU or plugins. Mostly fine with sharp periodic spikes points at garbage collection.
Paper's built-in /timings (or Spark) will tell you which of these it is in a couple of minutes, with far more certainty than adding memory and hoping.
Modpacks are a different problem
Modded servers genuinely need more memory, and for a specific reason: mods add block, item and recipe registries that are loaded permanently. A 300-mod pack can use several gigabytes before a single player joins, purely on static data.
That memory is live — it never gets collected — which means it directly increases every garbage collection's cost. This is why large modpacks need both more RAM and more careful tuning, not just more RAM.
What to do with the number
Once you have a figure, two rules:
- Set
-Xmsand-Xmxto the same value. The reasoning is explained in our Aikar's flags guide. - Never allocate 100% of the machine's RAM to the heap. The JVM needs memory outside the heap, and an OS that starts swapping will destroy your tick time far more effectively than a small heap ever could.
Estimate it for your server
If you want a starting number based on your player count, server type and mod count, our RAM calculator will give you one — along with the matching startup flags.