Skip to content
Puranode

Guide

How Much RAM Does a Minecraft Server Need?

Most Minecraft servers need far less RAM than forum threads suggest. A Paper server for ten friends runs comfortably in a 2 GB heap, a 150-mod pack for the same group wants 5 to 6 GB, and a 300-mod kitchen sink wants 8 to 10 GB. Player count matters much less than modpack weight and view distance, because memory is consumed by loaded chunks and entities rather than by connections, and if your server stutters rather than crashes, more RAM will not fix it at all.

FAQ

Frequently asked

Is 4 GB enough for a Minecraft server?

For a Paper or vanilla server it is comfortably enough for 20 to 40 players with a normal plugin set, and for a light Fabric or NeoForge pack it is enough for a small group. It is not enough for a 300-mod kitchen-sink pack, which wants 8 to 10 GB. Remember that a 4 GB plan is a 4 GB container, so the usable heap is closer to 3 to 3.2 GB once JVM overhead is accounted for.

Does adding more RAM increase TPS?

No. TPS is determined by how long the server takes to complete a tick, and that is single-threaded CPU work on one core. Extra heap only helps if the garbage collector was stealing time because the heap was nearly full. If your live set after a full collection is below about 70% of -Xmx and you still have lag, more RAM will make no measurable difference.

How much RAM do I need per player?

There is no fixed figure, because players cost memory through the chunks they keep loaded rather than through the connection itself. As a rough planning number, budget 50 to 100 MB per concurrent player on vanilla or Paper at view-distance 8, and 150 to 350 MB per player on a heavy modpack. The baseline heap for the world and the mods themselves is far larger than the per-player component in almost every case.

Why does my server crash with exit code 137 and no error in the log?

That is the kernel killing the container for exceeding its memory limit, and it happens outside the JVM so nothing is written to the Java log. It almost always means -Xmx was set equal to the container limit, leaving no room for metaspace, thread stacks and direct buffers. Lower -Xmx to about 80% of the container limit and the crashes usually stop immediately.

Should -Xms and -Xmx be the same value?

Yes, on a dedicated game server. A fixed heap avoids the pauses that come with growing and shrinking the heap at runtime, and it lets G1 size its regions once at startup. Aikar's flags assume this. The old advice about a small -Xms comes from desktop Java, where handing memory back to other applications matters; on a container already reserved for the server it only adds jitter.

Does a large world file mean I need more RAM?

No. World size on disk has almost no relationship to heap usage, because only loaded chunks occupy memory. A 40 GB region folder with a world border and a pre-generated map can run in a smaller heap than a 2 GB world where players constantly explore fresh terrain. Disk size affects backup time and I/O, not the amount of RAM you need.

How do I check how much RAM my server is really using?

Install spark and run its health command for a live view of heap usage, GC activity, MSPT and CPU load. The value to record is the heap in use immediately after a full garbage collection, not the peak. Compare that live set against your -Xmx: below 50% means spare capacity, above 85% consistently means you are genuinely short.

Is 16 GB overkill for a Minecraft server?

For nearly every server, yes. Very few Minecraft workloads have a live set above 10 GB, and past roughly 31 GB the JVM loses compressed object pointers so larger heaps actually lose usable capacity. If a sizing exercise points you above 12 GB, the likelier explanations are a memory leak, force-loaded chunks that never release, or a map renderer left running.

Want a Minecraft server without the setup?

4 GB for €10.99/mo, VAT included, online in about 60 seconds.