GDLauncher logo

How to Allocate More RAM to a Minecraft Server

Increase the memory available to a Minecraft server in GDLauncher so it handles more players, more chunks, and heavier modpacks without out-of-memory crashes.

Updated: May 2026

How much RAM does a server need?

Vanilla servers run comfortably on 1–2 GB for 1–4 players. Each additional player adds overhead, mostly from chunks loaded around them. Modded servers need substantially more, the mods themselves consume RAM regardless of player count, and chunk loading gets heavier with mods that add new dimensions or generate complex structures.

Rough starting points by load:

  • Vanilla, 1–4 players: 2 GB.
  • Vanilla, 5–20 players: 4 GB.
  • Light modpack (50 mods), 1–4 players: 4–6 GB.
  • Medium modpack (100 mods), 5–10 players: 6–8 GB.
  • Heavy modpack (All The Mods, GregTech, etc.): 8–12 GB and up.

Don't allocate everything you have

Leave headroom for the OS, the launcher itself, and any other running apps. Going past about 80% of system RAM causes swap thrashing, the server freezes for seconds at a time while the OS pages memory to disk.

If your machine has 16 GB total, 8–10 GB for the server is the sweet spot. If you want to allocate more, get more system RAM.

Server vs instance memory

The server's RAM setting is independent from any instance you've configured for the same modpack. They run in separate Java processes, one on your machine for the player instance, one for the server. Each has its own memory pool.

If you're running both at the same time on the same machine (a player joining a local server you host), make sure their combined allocation leaves headroom for the OS. 4 GB for the server plus 6 GB for the instance fits in a 16 GB machine; 8 GB plus 12 GB does not.

Watching for out-of-memory

The server console (Server view → Console tab) prints memory warnings when Java is close to the limit. If you see OutOfMemoryError or repeated long GC pauses ("garbage collector took N seconds"), bump the RAM up by 2 GB and restart.

Conversely, if the console shows the server using only a fraction of what you've allocated, you've over-provisioned. Java doesn't release unused heap back to the OS, so you're not gaining anything by giving it more than it needs, and oversized heaps actually hurt performance because GC pauses get longer.

Garbage collection on bigger servers

For servers above 8 GB, the same Aikar's flags that help client instances also help servers. They tune Java's G1 garbage collector to keep pause times predictable. Paste them into the Java Arguments field in the server's Settings tab:

-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

For smaller servers (under 4 GB) the defaults are fine, the flags are tuned for medium and large heaps.

Allocating instance RAM instead

If you're tuning the player side rather than the server, see the dedicated guide on allocating more RAM to a Minecraft instance. The flow is similar but the trade-offs are different.

Ready to Try GDLauncher?

Download GDLauncher and start playing modded Minecraft in minutes. One-click install for modpacks, mods, and more.

Download GDLauncher