The short answer
Plan on 2 GB for vanilla with a few friends, 4 to 6 GB for a Paper server with plugins, 8 GB for a busy survival server or a light modpack, and 12 GB or more for larger modpacks.
| RAM | Good for |
|---|---|
| 2 GB | Vanilla with a few friends |
| 4 GB | Paper with plugins, about 10 players |
| 6 GB | Paper with plugins, about 20 players |
| 8 GB | Light modpacks, or a busy survival server |
| 12 to 16 GB | Mid-size and large modpacks |
| 24 to 32 GB | Heavy modpacks and networks |
If you are running a modpack, check what its authors recommend first. Their figure beats any general table, including this one.
What actually uses the memory
- Mods. The biggest factor by far. Each one adds code and content that stay loaded, which is why a modpack with a handful of players can need more than a plain server with fifty.
- Loaded chunks. Every player keeps the area around them in memory, so view distance and how far apart players roam matter a great deal.
- Players. Each one adds some memory of their own, but mostly through the chunks they load.
- Plugins. Most use little, though large maps, economy and logging plugins can use more.
- Extra worlds. A network running several worlds or lobbies adds up quickly.
Java or Bedrock?
Java Edition runs on the Java Virtual Machine, and its memory figures are the ones you see quoted most. Bedrock’s dedicated server is written in C++ and generally needs less for the same number of players, but it has no plugin or mod scene on the scale of Java’s. Size for what you plan to run, not only for the edition.
More RAM does not always fix lag
A Minecraft server tries to run 20 ticks every second, which gives it 50 milliseconds for each tick. If the work takes longer, the world slows down for everyone, and that is what players call lag.
That work mostly happens on one thread, so it is limited by the speed of a single core rather than by memory. Once the server has enough RAM, adding more does nothing for a slow tick. Too much can even hurt, because the Java garbage collector has more to clear at a time.
The spark profiler shows the truth: it reports your ticks per second and memory use, and what is taking the time. Check it before you pay for an upgrade.
Get more from the memory you have
- Lower the view distance. In
server.properties,view-distanceandsimulation-distanceare the two settings that change the most. - Use Paper for plugin servers. It is built for performance and is tunable well beyond vanilla.
- Pre-generate your world. Generating new chunks while players explore is expensive. A plugin such as Chunky does it ahead of time.
- Set the start and limit the same. Give
-Xmsand-Xmxthe same value, so Java does not spend time resizing its memory. - Leave some headroom on your own server. On a VPS, keep about a gigabyte free for the operating system.
java -Xms4G -Xmx4G -jar paper.jar --noguiWhen to move up a size
Upgrade when spark shows memory staying close to the limit after garbage collection, when the server crashes with an OutOfMemoryError, or when you add a larger modpack. If memory is fine but ticks are slow, a faster processor will help more than more RAM.
Rackyard Minecraft plans run from 2 GB to 32 GB, with servers in India, Germany and the USA, and each location lists its processor.