How much RAM does a Minecraft server actually need
Wiki floors, Paper's 6 to 10 GB advice, modpack numbers, and the rule that bites panel users: set -Xmx 1 to 1.5 GB below your memory limit.
Quick answer For a small vanilla server the wiki says at least 2 GB, and possibly 4 GB for larger ones [3]. Paper’s Aikar’s flags page recommends at least 6 to 10 GB “no matter how few players”, and says more than that buys little [1]. Whatever heap you pick, set
-Xmxabout 1000 to 1500 MB below the memory your plan gives you [1]. On a 6 GB plan that is-Xms5G -Xmx5G, not 6G. That headroom rule matters more than the sizing number.
The numbers, and why they disagree
Three sources give three answers, and each one is right for its own question.
| Source | Number | What question it answers |
|---|---|---|
| Minecraft Wiki, setup tutorial | At least 2 GB for a small server, possibly 4 GB for larger ones [3] | What it takes to run |
| Minecraft Wiki, Server/Requirements | 1 GB for 1 to 4 players, 2 GB for 5 to 10, 4 GB for 10+; elsewhere on the page, “at least 4 GB of RAM for the collective use of the server and OS” [4] | Same question, but the page gives two different floors |
| PaperMC docs | “At least 6-10GB, no matter how few players” [1] | What Paper recommends alongside Aikar’s flag set |
The wiki’s own pages give different floors, which tells you how soft these numbers are. Nobody has measured your plugins, your player count or your world. Treat every row as a place to start.
My pick, and this is judgment rather than a measurement: for a Paper server with a handful of friends, start at 4 GB of heap and leave the tuning flags off. Go to 6 GB or more if you want the flags or expect a bigger player count. Do not go far past 10 GB without a reason you can point at in a spark report. Paper makes the same point from the other side: “more memory does not mean better performance above a certain point”, and 32 GB for a server “will only waste your money with minimal returns” [1].
Does a bigger heap make lag spikes longer?
A common claim is that a bigger heap means longer garbage collection pauses. The sources I read do not back that up for current Java. Here is what they say.
- The Minecraft wiki says a heap set too high “can make GC too long on Java 8” [3]. That is scoped to Java 8. Minecraft 26.1 and later requires Java 25 [3], so a server on a current version is not on Java 8.
- The same page says modern JVMs (17, 21 or higher) “are quite good at handling various applications with default settings” [3].
- Aikar’s article says “G1GC operates better with more memory”, and describes his 200 ms pause setting as a goal for how long you want the server to pause, not a guarantee [5].
So do not oversize the heap, but not because pauses grow with it. The real costs of oversizing are wasted money and the container problem in the next section. I did not benchmark pause times at different heap sizes, so if you suspect your own server, measure (further down).
Heap is not the same as your plan’s memory limit
-Xmx caps the Java heap. The Java process uses memory beyond the heap too, and Paper notes it can use “a little more than -Xmx” [2]. On a panel with a hard memory limit, a heap that equals the limit leaves nothing for that. The container gets killed from outside, and Java never gets to write an error. The crash-type post shows what that looks like in the console.
Paper’s rule is to reduce -Xmx and -Xms by about 1000 to 1500 MB below what the host says you have. Its example: “Do you have 8GB of memory? Use 6500MB for safety.” It also suggests asking your host whether they will cover that overhead and give you 9500M instead [1]. The troubleshooting page says 1 to 2 GB is a good initial rule of thumb [2].
Worked example for a plan with a 6144 MB limit:
| Setting | Heap | Left for Java’s other memory | Verdict |
|---|---|---|---|
-Xms6G -Xmx6G |
6144 MB | 0 MB | No headroom, likely to be killed |
-Xms5G -Xmx5G |
5120 MB | 1024 MB | At the low edge of Paper’s 1000 to 1500 MB range |
-Xms4500M -Xmx4500M |
4500 MB | 1644 MB | Safer if you run many plugins or mods |
Keep -Xms equal to -Xmx on a dedicated server. The wiki says equal values “disable heap scaling and give maximum startup speed” [3].
Example, your values will differ. The start of a startup command for that plan:
java -Xms5G -Xmx5G -jar paper.jar --nogui
Tuning flags go between the heap options and -jar. The full string is in the Aikar’s flags post.
Modpacks: take the author’s number as a floor
A pack adds far more block, item and entity types than vanilla, and my reading is that the server has to hold all of that before anyone joins. I could not find a sourced per-mod memory cost, so I will not give you one. What you can read is each pack’s own figure.
- RLCraft’s CurseForge page says “The default 1GB of RAM that is allocated is NOT enough” and recommends “allocating 3 to 4GB’s of RAM” [7]. It is a Minecraft 1.12.2 pack and its latest file is from 2023, so treat it as an example of the pattern, not a number for a 26.3 world.
- The All the Mods 10 server files ship with
-Xms4G -Xmx8G, according to our ATM10 setup post, which read that file directly. The pack’s own pages give no RAM requirement.
Those figures describe the pack. A multiplayer server with real players and world generation is a heavier load, so raise the number when evidence says so, not before.
How to tell whether you need more
Do not guess from the panel graph. Paper’s docs say that unless you are seeing out-of-memory crashes or bad garbage collection times, high memory usage is expected: the heap grows over time and the Java process uses the RAM it is given [2]. A graph sitting near the ceiling is normal.
With the spark plugin installed, check these instead:
/spark healthgenerates a health report covering TPS, CPU, memory and disk usage [6]./spark gcmonitortoggles garbage collection monitoring, and/spark gcprints the server’s GC history [6]. If long pauses line up with your lag spikes, memory pressure is a suspect./spark heapsummarygenerates a heap dump summary and uploads it to the viewer [6]. That is the tool when memory keeps climbing and you suspect a plugin.
My reading, not a sourced threshold: if the log has no OutOfMemoryError, nothing was killed, and no GC pauses line up with your spikes, adding RAM will not fix the lag.
When it crashes, which fix applies
| What you see | What it means | Fix |
|---|---|---|
java.lang.OutOfMemoryError: Java heap space in the log |
The heap filled up | Raise -Xmx, if the plan has room above the headroom margin |
| Panel reports the server was killed and the Java log just stops | The container hit its memory limit | Lower -Xmx, or raise the panel limit [2] |
| Spikes while memory is mostly free | Not a sizing problem | Look at CPU, simulation-distance and plugins first |
The first two have opposite fixes, and raising -Xmx on the second makes it worse. OutOfMemoryError, OOM kill or watchdog covers telling them apart. For spikes that RAM will not fix, the next stops are single-thread CPU speed and simulation-distance.
What I did not verify
I did not measure memory use or pause times at different heap sizes for this post, and I found no sourced RAM requirement for any current modded pack. The sizing picks marked as my judgment are exactly that. The Paper figures come from its docs as read on November 17, 2026.
Questions people ask
Should I just give the server all the RAM my plan has?
No. Java uses memory on top of the heap, so a heap equal to your plan's limit leaves no room for it. Paper says to reduce Xmx and Xms by about 1000 to 1500 MB below what your host gives you, and its example is that 8 GB of host memory means about 6500 MB of heap [1].
Does a bigger heap make garbage collection pauses longer?
The wiki ties 'too high makes GC too long' to Java 8 and says modern JVMs handle default settings well [3]. Aikar's own article says G1GC operates better with more memory [5]. Past a point more memory is just wasted: Paper says 32 GB for a server will only waste your money with minimal returns [1]. I did not benchmark pause times myself.
Does more RAM raise my TPS?
No. Paper treats high memory use as normal unless you see out-of-memory crashes or bad garbage collection times [2]. The tick loop uses a single thread, and Paper says a point is reached after which more cores do not help [2]; the wiki asks for strong single-core CPU performance [4].
My panel's memory graph sits near the limit. Is that a leak?
Usually not. Paper's docs say high memory use is expected unless you see out-of-memory crashes or bad garbage collection times, and that the Java process uses the RAM it is given [2].