Skip to content
Puranode

Tools / Minecraft

Minecraft server RAM calculator

Enter your player count, server software, view distance and world age. You get a plan size in GB, the reason for each part of it, and a startup line with Aikar's flags and a heap that leaves the container room to breathe.

Calculator

Your server

10
Count the busiest evening, not the number of people who have ever joined.
8
The view-distance value in server.properties. 8 is a sound server default.

Recommended

4 GB

Plan RAM

3200M

Heap, for -Xms and -Xmx

2.5 GB

Heap this server needs

A 4 GB plan with a 3200M heap leaves 896 MB for the memory Java uses outside the heap.

Server type
2 GB
A Paper or Spigot server with a normal plugin set holds about 2 GB before anyone joins.
Players
+0.5 GB
10 players at about 50 MB each. Players cost memory through the chunks they keep loaded, not the connection.
View distance
289 chunks
View distance 8 keeps 289 chunks loaded per player. This is the baseline the per-player figure assumes.
World
+0 GB
A new world has little built in it yet. Generating fresh terrain costs CPU time, not heap.

Startup line

JVM startup line with Aikar's flags

java -Xms3200M -Xmx3200M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar --nogui

One line. Change the jar name to match your file.

Worked out in your browser. Nothing you enter here is sent or stored.

Method

How the number is worked out

Worked examples at view distance 8

ServerHeap neededPlan-Xmx
Vanilla, 5 players1.5 GB2 GB1500M
Paper with plugins, 10 players2.5 GB4 GB3200M
Paper with plugins, 20 players, established world3.3 GB6 GB4900M
Paper with plugins, 40 players4.0 GB6 GB4900M
Light modpack, 6 players3.2 GB4 GB3200M
Heavy modpack, 8 players5.6 GB8 GB6500M
Kitchen-sink modpack, 10 players9.0 GB12 GB9800M

Server types used: Vanilla, Paper or Spigot with plugins, Light modpack (40 to 80 mods), Heavy modpack (150 to 250 mods), Kitchen-sink modpack (300+ mods). Treat every row as a starting point, then measure the live server with spark.

FAQ

Minecraft RAM calculator: questions

Why is -Xmx lower than the plan size?

Java uses memory outside the heap for loaded classes, thread stacks, the JIT code cache and network buffers. If -Xmx equals the container limit, that extra memory pushes the container over and the kernel kills the server with exit code 137 and no Java error. The calculator sets the heap about 20% below the plan, with at least 512 MB left free.

Will more RAM fix a laggy Minecraft server?

Only if the heap is the problem. Tick time is single-threaded CPU work, so a server with high MSPT and a healthy heap gains nothing from more memory. More RAM is the right fix when the log shows OutOfMemoryError, or when heap in use stays above about 85% of -Xmx straight after a full garbage collection.

Do Aikar's flags work with Forge, NeoForge and Fabric?

Yes. They tune the G1 garbage collector in the JVM, so they apply to any Minecraft server jar. Fabric and Paper take them on the java command line. Current Forge and NeoForge servers read JVM flags from the user_jvm_args.txt file next to run.sh, one flag per line.

Should -Xms and -Xmx be the same?

Yes, on a server. A fixed heap never pauses to grow or shrink, and G1 sizes its regions once at startup. Aikar's flags assume both values match, which is why the startup line sets them to the same number.

Is anything I enter sent to Puranode?

No. The calculation runs in your browser. The page makes no request with your inputs and stores nothing.

Need somewhere to run it?

Puranode hosts Minecraft servers on EPYC and NVMe in the EU: Paper, Spigot, Forge and Fabric.

Minecraft hosting

All free tools