How much RAM does a Minecraft server need?

By kimolo · 28 October 2026

A Crucial DDR4 laptop RAM stick installed on a motherboard
Photo: Diego Torres Silvestre, CC BY 2.0, via Wikimedia Commons

Most people pick a RAM number first and work out the rest later. More is usually treated as better. In practice a well set up server with the right amount of memory beats a badly set up one with twice as much, and past a point extra RAM does nothing or makes things worse.

Here's how I size them, and how to tell whether memory is your problem at all.

Rough numbers to start from

These are starting points, not rules. Plugins, mods, how far people roam and how much farming and redstone they build all move the number.

Vanilla or Paper (with a normal handful of plugins):

  • 2 to 5 friends: 2 to 4 GB
  • 10 to 20 players: 4 to 6 GB
  • 30 to 50+ players with lots of plugins: 6 to 10 GB, and at that size the CPU is usually the limit before RAM is

Modpacks:

  • Light packs (under about 100 mods): 4 to 6 GB
  • Medium packs (100 to 200 mods): 6 to 8 GB
  • Big kitchen-sink packs (250+ mods): 8 to 12 GB

Add a bit on top of those for a busier group on a modpack, since every player loads chunks around them and each modded chunk carries more data.

For a sense of scale, I run my servers on a home machine with about 5 GB of RAM in total. A NeoForge 26.2 pack built around Alex's Caves gets 4 GB and a Fabric 26.3 pack gets 3 GB. Both are fine for a small group because the packs aren't huge and the worlds are pre-generated (more on that below).

Paper's own docs suggest 6 to 10 GB even for small servers. That's a comfortable figure if you have it, but a few friends on Paper will run happily on less.

Leave room for the operating system

The number you give Java is the heap: the space the game's objects live in. The Java process uses more than that on top, for loaded classes, threads, compiled code and network buffers. The operating system and anything else on the machine need memory too.

Paper's docs recommend setting your heap about 1 to 1.5 GB below what the machine or plan has. On an 8 GB box that's around 6.5 GB. If you set the heap to the full amount, the system starts swapping to disk or Linux kills the server outright. A killed server often leaves no Java error in its log at all, just a stop. On Linux, journalctl -k or dmesg will show an "Out of memory: Killed process" line if that's what happened.

Why more RAM can make it worse

Java doesn't free memory as it goes. It lets garbage pile up and then cleans it in batches, called garbage collection (GC). Some of that work pauses the game while it runs.

Giving a server far more heap than it needs causes a few problems:

  • Over-allocating the machine. This is the common one. If the heap plus Java's overhead plus the OS is more than the physical RAM, you get swapping or the server getting killed, and both are far worse than a slightly small heap.
  • Bigger cleanups. With more room, garbage can build up longer before it's collected. The collector is designed to keep pauses short, but a badly tuned big heap can still produce noticeable stutters.
  • Hiding a leak. If a plugin or mod leaks memory, a huge heap just delays the crash by a few hours and makes it harder to track down.

It's also normal for a panel's memory graph to sit near the top. Java will happily fill the heap before collecting, so "it's using all 6 GB" doesn't mean it needs 6 GB.

Java flags in 2026

Minecraft 26.1 and later need Java 25. Versions 1.20.5 to 1.21.x need Java 21. Get that right first, because a wrong Java version won't start at all.

For the memory itself, set the minimum and maximum heap to the same value:

java -Xms4G -Xmx4G -jar server.jar nogui

-Xmx is the most the heap can grow to and -Xms is what it starts with. Setting them the same avoids the heap growing and shrinking while people play, and it's what Paper recommends. On NeoForge and Forge, put the -Xms/-Xmx line in user_jvm_args.txt instead of editing the start script.

Aikar's flags. These are a long list of G1 garbage collector settings tuned for Minecraft, and they're still published in Paper's docs. Paper's start script generator now says to try no extra flags first on modern Java (17, 21 or newer), because the defaults are good, and to reach for Aikar's flags if you see GC problems or run an old version. That matches what I do. One thing to know: Aikar's flags include -XX:+AlwaysPreTouch, which claims the whole heap from the OS at startup. That's fine on a dedicated box but unhelpful on a tight one shared with other things.

ZGC. Java 25's ZGC is a low-pause collector and some big servers use it with -XX:+UseZGC. It wants spare memory to work well, so on a small heap of 3 to 6 GB I'd stick with the default G1.

CPU speed often matters more than RAM

Minecraft does most of its world work on one main thread. Every tick has 50 milliseconds to finish to hold 20 ticks per second. If a tick takes longer, the server falls behind and you get "Can't keep up!" in the log, rubber-banding and slow mobs.

No amount of RAM fixes a slow tick. A fast modern CPU with high single-core speed does more for a busy or modded server than doubling its memory. When you compare hosts, look at the CPU model, not just the GB.

View distance and simulation distance

Two settings in server.properties drive both memory and CPU load:

  • view-distance is how many chunks around each player get sent to their game. It costs RAM and bandwidth.
  • simulation-distance is how many chunks around each player actually tick: mobs move, crops grow, redstone runs. It costs CPU.

Both default to 10. Dropping simulation distance to around 6 is one of the cheapest wins there is, and most players never notice. View distance of 8 still looks fine for most groups. On small machines I lower both.

Pre-generate the world

Generating new terrain is one of the heaviest things a server does, and modded world generation is heavier again. A couple of players flying in different directions on fresh ground can drag the whole server down.

Set a world border and pre-generate inside it before people join, using a mod or plugin like Chunky. Run it overnight, then the server only has to load chunks from disk instead of building them. It also stops memory spiking every time someone explores.

How to tell if RAM is actually the problem

Before you buy more, check:

  • OutOfMemoryError in the log. That one is clear: the heap is too small or something is leaking.
  • The server stops with no error. Check for the Linux out-of-memory killer as above. That means the whole machine is short, not the heap.
  • Memory after collection keeps climbing. Use spark, which is built into Paper since 1.21 and available as a mod for Fabric, NeoForge and Forge. /spark health show --memory shows heap use, and /spark gc shows how often collections run and how long they take. If memory drops back to a steady level after each collection, you have enough. If the floor creeps up for hours, something is leaking.
  • Lag with plenty of free memory. Run /spark profiler start --timeout 300 during the lag. If the report shows the tick time going to entities, chunks or a specific mod, that's a CPU problem, and I've written up the common lag causes and fixes separately.

If your modded server won't start at all, memory is rarely the first suspect. It's more often a client-only mod in the server's mods folder.

Want a hand?

I set up and run Minecraft servers, sized for what you're actually playing. If you're not sure what yours needs, message me on Discord with the pack or plugin list and player count.

← All notes