How much RAM does a Minecraft server need?

By Kosy · · 3 min read

"How much RAM do I need?" is the first question everyone asks, and the honest answer is: less than you think for a small server, and more than RAM alone can fix if your settings are wrong. Here are rough numbers, then the things that matter more.

Rough numbers

These are starting points, not promises. Your plugins, world and players change them.

Server Players online Memory to start with
Vanilla or Paper for a few friends 1 to 5 1 to 2 GB
Paper with a handful of plugins 5 to 15 2 to 3 GB
A busy survival or SMP server 15 to 40 4 to 6 GB
Minigames, big communities, lots of plugins 40 and up 6 to 8 GB and more, often split across servers
A heavy modpack 5 to 20 6 to 10 GB, and what the pack's authors recommend

If a modpack tells you how much memory it needs, believe it. Large modpacks load thousands of blocks and items, and they need the memory just to start.

What actually uses memory

  • The world around the players. Every loaded chunk takes memory. The number of loaded chunks is set by the view distance and the simulation distance (see below), multiplied by the number of players who are spread out.
  • Entities. Mobs, animals, dropped items and villagers are expensive, especially in large farms and mob grinders.
  • Plugins. Most are small. A few (maps, large economy plugins, anything with a database in memory) are not.
  • The server itself. Even an empty server uses a few hundred MB for the game, the Java runtime and the plugins.

The settings that matter more than RAM

If your server is slow, adding memory is often the wrong fix. Check these first.

  1. view-distance in server.properties. The default is 10. Lowering it to 6 to 8 cuts the loaded chunks, and the load, a lot.
  2. simulation-distance. Also in server.properties (1.18 and newer). It controls how far from a player mobs and blocks are ticked. Values of 4 to 6 keep farms working near you and save a lot of CPU.
  3. Pre-generate the world. Exploring new terrain is the heaviest thing a server does. A plugin such as Chunky can pre-generate the area around spawn while nobody is online.
  4. Profile before you guess. The free plugin spark shows what is slow. Run /spark profiler start, play for a few minutes, then /spark profiler stop and read the report.

The guide on how to fix Minecraft server lag goes through these step by step.

Too much memory can hurt too

Java needs time to clean up unused memory. A very large heap on a small server can make those pauses longer and cause lag spikes. Giving a 5-player server 16 GB does not make it faster, and on shared hardware it just wastes what other servers could use.

How to choose

  1. Start with the smallest size in the table that matches your players.
  2. Watch your memory use and your tick rate (TPS) while people play. A healthy server holds 20 TPS.
  3. If memory is nearly full all the time, or the server stops during busy hours, go up one step.
  4. If you have lots of spare memory and 20 TPS, you can stay where you are.

On Saryno

Memory is simple here: 1 GB is free, and more is $3 per GB a month. You can change the amount at any time, so start small and add memory when the numbers tell you to.

More to read