Minecraft RAM Calculator

Minecraft Java

Enter your game or server settings for a memory estimate and ready-to-copy startup arguments.

Your setup

1–200
0–500
Startup settingsG1GC

Start with G1GC. This ZGC preset targets Java 21. Select the Java version in your launcher or on your server.

For example, paper.jar. Use letters, numbers, dots, hyphens and underscores.

Start with this allocation

≈ 4 GB

Allocate to the Minecraft process

Minecraft
4 GB
Headroom outside the game heap
1 GB

For hosting or a VPS, start around 5 GB including headroom.

This is an estimate from your settings, not a measurement of your game. Check it with your own pack.

start.shView code
#!/usr/bin/env bash
java -Xms4G -Xmx4G -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 server.jar nogui

Where to use it

Save the script in the same folder as server.jar. Run bash start.sh. Check your Java version first with java -version.

server.propertiesOptional

Example view-distance settings. Back up the file and replace only the lines you need. More RAM does not replace CPU performance.

view-distance=8
simulation-distance=6
max-players=10
network-compression-threshold=256

Questions & reference

How accurate is this memory estimate?

This is a starting estimate based on the pack type, mod count, and player count. It does not measure your game. Packs with the same mod count can use very different amounts of memory. Check actual memory use and a performance report after starting, then adjust the allocation.

Why should I leave memory outside Minecraft?

The -Xmx flag limits the Java heap. Your OS, other applications, and Java itself also use memory outside that heap. The estimate leaves headroom, but you should check actual use on your PC or hosting plan.

How do I use the startup script?

Select Windows or Linux and enter the actual server file name. Save start.bat or start.sh next to that file. Run start.bat on Windows or bash start.sh on Linux. For Pterodactyl, select the separate output format and check your panel’s rules.

Should I use G1GC or ZGC?

Start with G1GC and compare results with your own pack. Aikar’s flags are a server preset, not a promise of higher FPS. The ZGC preset on this page targets Java 21 and is unavailable for legacy 1.12.2 / 1.16.5 packs. This generator does not install or switch Java.