Guides • 8 min read • 6 views

How much RAM does a Minecraft server need? A practical guide

Vanilla, plugins, modded or large modpack: how much RAM your Minecraft server needs, the signs it is short on memory and how to set Java memory correctly.

S

Introduction

For a Minecraft server, plan 4 to 6 GB of RAM for a Vanilla or Paper world with friends, 8 to 12 GB for a community server with around thirty plugins, 10 to 16 GB for a modded server (Forge, NeoForge, Fabric) and 16 GB or more for a large modpack with over 300 mods. The player count is not what sets the RAM first: what runs on the server is.

This guide explains where memory usage comes from, gives figures for each type of server, shows how to tell whether your server is short on RAM (or has too much) and how to set Java memory the right way.

What really uses a Minecraft server's RAM

A Minecraft server is a Java program. All of its working memory lives in what Java calls the "heap", whose size is set at startup by two options: -Xms (starting memory) and -Xmx (maximum memory). The heap fills up with four things:

  • Loaded chunks. Each player keeps an area of chunks in memory around them, set by the view-distance in server.properties. At a distance of 10, that is a 21 × 21 square, or 441 chunks per player when players are far apart. Going to 16 raises it to 1,089.
  • Entities. Farm animals, villagers, dropped items, mobs from automatic farms: each one takes memory and processing time.
  • Plugins or mods. A land protection or economy plugin weighs little. A mod loads its blocks, items, recipes and world generation structures: 200 mods means several gigabytes before a single player joins.
  • Terrain generation. Exploring new areas generates chunks on the fly, which creates usage spikes, especially with biome or structure mods.

In practice: three players on a 250 mod pack use more memory than twenty players on a well tuned Paper server.

How much RAM for each type of server

These figures come from real usage, with view-distance left at 10 or lower. They are orders of magnitude, not guarantees: a very old world, a huge farm or a map pre-generated over thousands of blocks can move them.

Server typePlayersRecommended RAM
Vanilla or Paper, survival with friends2 to 104 to 6 GB
Paper or Purpur with 20 to 50 plugins10 to 408 to 12 GB
Light modded server (50 to 100 mods)2 to 108 to 10 GB
Medium modpack (100 to 250 mods)2 to 1010 to 16 GB
Large modpack (All The Mods, 300+ mods)2 to 1016 to 24 GB

For a modpack, the best reference is the pack's page on CurseForge or Modrinth: most of them state a minimum server RAM. Add 2 to 4 GB on top if you are more than five players or explore a lot.

What about Minecraft Bedrock?

The official Bedrock server is not written in Java and uses much less: 2 to 4 GB is enough for a small group. If you want Bedrock players to join a Java server, the answer is Geyser, explained in our guide Minecraft Bedrock and Java server with Geyser. Geyser adds little memory, a few hundred MB.

Signs your server is short on RAM

A server running out of memory does not always stop at once. It slows down first, unevenly. Symptoms to watch for:

  • Lag spikes every few seconds or minutes, while everything is smooth the rest of the time. This is often Java's garbage collector working nonstop to free space.
  • The message "Can't keep up! Is the server overloaded?" repeating in the console.
  • A java.lang.OutOfMemoryError: Java heap space error in the console or logs, followed by a crash. Here the diagnosis is clear.
  • A server that always crashes at the same moment: when a new player joins, while exploring, or when a modded dimension loads.

Be careful, not all lag comes from RAM. A low TPS (ticks per second, 20 at most) with half empty memory points to the CPU instead: too many entities, a redstone farm, a badly written plugin. On Paper, the /tps command shows TPS, and a tool like spark (/spark profiler) shows exactly what is consuming resources. Our 15 tips to optimize a Minecraft server cover these settings.

Too much RAM is possible too

You might think more memory is always better. Not quite. Giving 24 GB to a four player Vanilla server brings nothing: the memory stays empty. And a very large, poorly tuned Java heap can cause longer garbage collector pauses, meaning micro lag.

Two simple rules:

  • Never give Java all of the machine's RAM. The Java process also uses memory outside the heap: threads, native libraries, memory from mods that use native code. It needs headroom, otherwise the system kills it.
  • Use suitable Java flags. "Aikar's flags", recommended by the PaperMC documentation, tune the G1 garbage collector for a Minecraft server: short pauses, regular cleanup. They work on Paper, Spigot, Forge, NeoForge and Fabric.

How to set your server's Java memory

If you host it yourself, memory is set in the launch command, for example java -Xms6G -Xmx6G -jar server.jar nogui. Setting -Xms and -Xmx to the same value stops Java from resizing its heap during play.

On serv-minecraft, you have nothing to write. In your panel, the Advanced tab of the console has a Startup command card with two ready made settings, calculated from your plan's RAM:

  • Optimized: Aikar's flags, with a Java heap that leaves 25% of the RAM outside Java (1 GB minimum). The right choice for Vanilla, Paper and plugin servers.
  • Modpack: the same flags, with a wider 35% margin (1.5 GB minimum) for the mods' native memory. The right choice for Forge, NeoForge and Fabric.

Hovering over each button shows the exact Java memory that will be used. The setting applies at the next restart, and a button lets you return to the original command at any time. On a 12 GB plan, for example, the Optimized setting gives a 9 GB Java heap; on 24 GB, the Modpack setting gives about 15.5 GB.

Which plan to choose for the right RAM

Our plans are sized on the figures above. Prices include VAT, per month, no commitment:

PlanRAMPrice / monthBest for
Start6 GB€3.99Vanilla, light Paper, survival with friends
Plugins12 GB€8.99Paper or Purpur with many plugins, small community, light modded server
Modded24 GB€18.99Forge, NeoForge, Fabric, medium to large modpacks
Modpack32 GB€24.99Very large modpacks, many players, live map included

All of them run on high frequency Xeon CPUs with NVMe storage, in France, with Anti-DDoS protection and automatic backups. If your server grows, you can change plan from the panel.

For a plugin server, see the Minecraft plugins server plan. For a modded server, the modded Minecraft server plan, and our guide installing Forge or Fabric to pick a loader. The full cost breakdown, free options included, is in how much does a Minecraft server cost.

Frequently asked questions

Is 4 GB of RAM enough for a Minecraft server?

For a Vanilla or Paper server with 2 to 5 players and a reasonable view distance, yes. For a modded server, no: most recent modpacks need at least 6 GB on the server side, often more.

How much RAM for a modded Minecraft server?

Plan 8 to 10 GB for 50 to 100 mods, 10 to 16 GB for a medium modpack and 16 to 24 GB for large packs like All The Mods. Check the minimum RAM stated by the pack author, then add a margin based on player count.

How much RAM for 20 players?

On Paper with common plugins, 8 to 12 GB works for 20 players. On a modded server, that many players calls for 16 GB or more, and a fast CPU matters as much as memory.

Does more RAM fix all lag?

No. If TPS drops while memory is not full, the bottleneck is the CPU: entities, farms, heavy plugins or mods. Adding RAM changes nothing; you need to find the cause with a tool like spark.

Should -Xms and -Xmx be the same value?

Yes, that is PaperMC's recommendation with Aikar's flags: Java reserves its memory once at startup and does not waste time growing its heap during play.

Summary

A Minecraft server's RAM depends on what runs on it: 4 to 6 GB for Vanilla or Paper with friends, 8 to 12 GB with many plugins, 10 to 16 GB for modded, 16 GB and more for large modpacks. Always leave headroom outside Java, use suitable flags, and check TPS before blaming memory. On serv-minecraft, the Java setting takes one click in the panel, and you can change plan from the same panel.

Put it into practice

Launch your Minecraft server now

No commitment, unlimited slots, Anti-DDoS included.

Related articles

Ready to create your server?

Launch your Minecraft server in less than 30 seconds with our high-performance French infrastructure.

Create my server

Talk to an expert

Tell us about your project, we will suggest the right plan.

Reply by email

7 days a week support. No sales calls.

Join the Discord
Loading page