Skip to main content
Starmine, Minecraft server hosting

How much RAM for a Minecraft server in 2026

9 min read

A Paper 1.21 server with 10 players often starts at 4 Go, not 12 Go. For a small Vanilla server, start at 2 Go, for an intermediate modded server at 6 or 8 Go, then measure before increasing. There is no universal amount of RAM, because chunks, entities, mods, plugins and the processor change everything.

How much RAM should you set at the start for a Minecraft server?

The answer is in a table, with one limit to keep in mind: these values are starting points. They do not promise a player count. A server with

10players standing still at spawn uses less than a server with5players on elytra, each one off generating a new area.

 

Simultaneous playersVanillaPaper or PurpurLight FabricForge, NeoForge or modpack
2 to 52 Go2 Go3 Go4 to 6 Go
5 to 103 Go3 to 4 Go4 Go6 to 8 Go
10 to 204 to 6 Go4 to 6 Go5 to 8 Go8 to 10 Go
20 to 506 to 10 Go6 to 10 Go8 to 12 Go10 to 16 Go

Beyond

16 Gofor a single server, look for the culprit before paying more. Checkview-distance=10, a dynmap plugin, mob farms or a machine mod that keeps chunks active. The query "combien de ram serveur minecraft" does not call for a fixed value. It calls for a measurement.

 

Choosing RAM based on Vanilla, Paper, Fabric, Forge or NeoForge

Vanilla loads the server without a dedicated optimization layer. In

1.21, it runs properly with2 Gofor a few players, but it handles loaded villages, many entities and fast exploration less well. Paper and Purpur change server behavior. They add settings inpaper-global.yml,paper-world-defaults.ymletpurpur.yml. On an identical map, Paper often holds TPS better with the same RAM, because some calculations are better limited.

 

Fabric does not mean light by default. A Fabric with

Lithium,FerriteCoreetsparkcan stay modest. A Fabric with dimensions, machines and custom worldgen gets closer to a Forge modpack. Forge and NeoForge load registries, recipes, entities, blocks and sometimes multiple dimensions right from startup. Themodsfile does not tell the whole story, but a pack with150mods does not have the same profile as a Vanilla server with5datapacks.

 

Do not copy

-Xmx12Gbecause a pack lists it for the client. The client keeps textures, the interface and rendering. The server keeps simulation, chunks, entities and world data. These are not the same loads.

 

Adjust view-distance and simulation-distance before adding RAM

 

view-distancefixes the number of chunks sent around the player.simulation-distancefixes the chunks that really live, entities, crops, redstone, liquids, AI. Both are set inserver.properties. In1.18and later, taller worlds also add more data volume per chunk.

 

The gap shows immediately. With

view-distance=10, a player can receive a zone of21 x 21chunks, or441chunks. Withview-distance=8, the area drops to17 x 17, or289chunks. You remove152potential chunks per player. At20players, the server feels it.

 

Start with

view-distance=8etsimulation-distance=6for an active survival server. Lowersimulation-distance=4if farms, villagers or mobs are saturating the tick. Raisingview-distance=12makes the map nicer to look at, but you pay in RAM, disk and CPU. If players explore by boat on a new map, the chunk generator takes over your evening.

 

Allocated RAM, used RAM and available RAM, reading the right figures

Three numbers get mixed up quickly. The RAM allocated to Java comes from launch options, for example

-Xms2G -Xmx6G. The RAM actually used changes during play. Available memory on the machine also includes the system, backups, disk cache, the panel, MariaDB if you use it, and sometimes a Velocity proxy on port25577.

 

On Linux, type

free -hto read global memory. Typeps -o pid,rss,cmd -C javato see the resident memory of the Java process. In the server,procsexists on Paper.sparkt health gives a more useful reading if the spark plugin is installed.

 

Do not confuse

Xmxand permanent usage. A server started with-Xmx8Gcan use3,5 Goafter the garbage collector. That is normal. On the other hand, if the process stays at7,8 Gosur une limite8 Gofor several minutes, then crashes, the limit is too low or there is a memory leak. Also keep1 to 2 Gofor the system on a small machine.

 

Why giving Java too much RAM does not make Minecraft smoother

Java uses a garbage collector. It frees memory that is no longer used. Since Java

17, used by Minecraft1.18to1.20.4, and Java21, common for Minecraft1.20.5and1.21, behavior has improved compared with Java8. But more heap does not mean more TPS.

 

A

-Xmx16Gon a server that normally uses5 Givesthe collector a large area to scan. Depending on the options, pauses can last longer. You then see spikes at300 msor800 msin timings, not an improvement. Old copy and paste setups with-XX:+UseConcMarkSweepGCare a bad idea, CMS is gone, and recent Java ignores it or refuses to start.

 

Keep

-Xmsclose to-Xmxon a Minecraft dedicated server, for example-Xms4G -Xmx4G. Avoid this setting on a machine that hosts several services, because Java reserves too much too quickly. Port25565does not saturate just because you only have4 Go. It rarely saturates at all. The server tick, though, breaks quickly.

 

Recognizing a real RAM shortage on a Minecraft server

A RAM shortage leaves clear traces. The message

java.lang.OutOfMemoryError: Java heap spaceindicates that the Java heap has reached its limit. The messagejava.lang.OutOfMemoryError: GC overhead limit exceededindicates that Java is spending its time cleaning up without recovering enough memory. Inlogs/latest.logorcrash-reports, also look forException in server tick looparound the crash.

 

The symptom to trust is not "the server lags". It is memory climbing close to

95 %deXmx, then dropping only a little after the garbage collector, then rising again immediately. On-Xmx6G, staying at5,8 Gofor an hour with freezes points to a real RAM problem or a leak.

 

By contrast,

Can't keep up! Is the server overloaded? Running 5000ms or 100 ticks behinddoes not prove a memory shortage. This message also appears when a plugin blocks the main thread, whenworldgenerates too many chunks, or whentickexceeds50 ms. A heap error calls for more RAM or an investigation into the mods. A TPS of12calls first for profiling.

 

Understanding why TPS drop even with enough RAM

Minecraft targets

20 TPS. A tick therefore has50 ms. If the server takes90 msto process a tick, RAM can be half empty and players still lag. This is the classic trap of servers with8 Goor12 Go: buying memory hides the real expense item.

 

The causes often repeat. Too many villagers in a trade hall. Too many items on the ground after a farm. Too many hoppers scanning inventories. Too much fast clock redstone. A badly configured protection plugin that checks every block. A machine mod that ticks entire networks. A new world where several players on elytra force chunk generation.

Install

sparkand runspark profiler --timeout 120during the lag. On Paper, compare with/timings on, wait5 minutes, then/timings paste. Ifminecraft:hopper,Villageror a specific plugin consumes the time, adding4 Gochanges nothing. Reduce the cause, or accept fewer simultaneous players on the same processor.

 

Sizing RAM for a modded Minecraft server

The RAM of a modded Minecraft server depends on the pack type, not the mod count. A pack of

80mods with libraries, quality of life features and a few blocks can fit in4 to 6 Go. A pack of120mods with dimensions, worldgen, machines, energy and custom mobs may need8 to 10 Go. A large pack of250mods can start at10 to 12 Go, then go up depending on the map.

 

Pack typeCommon profileReasonable starting pointThreshold that smells bad
Small pack50 to 100 mods, few dimensions4 to 6 Go6 Gofull at spawn
Intermediate pack100 to 180 mods, machines and exploration6 to 8 Go8 Gofull with5players
Large pack180 to 300 mods, dimensions and automation10 to 12 Go12 Gofull without an advanced base

Look at the files

config,defaultconfigsetserverconfigin the world. Some mods load dimensions at startup. Others cost almost nothing until a player places their blocks. The player count adds pressure, but a3player industrial base can cost more than12players at the start of survival.

 

Testing RAM in production without guessing

Work in steps. This method avoids the server started at

-Xmx20Gbecause it crashed once, then was forgotten for six months with the same bad setting.

 

  1. Start with a consistent value:-Xms4G -Xmx4Gfor Paper1.21with5 to 10players, or-Xms8G -Xmx8Gfor an intermediate pack.
  2. Setview-distance=8etsimulation-distance=6inserver.propertiesbefore the first test. Otherwise you are measuring a setting that is too wide, not the RAM.
  3. Let people play during busy hours for48 hours. Check/spark health, TPS, memory after garbage collector and the messages inlogs/latest.log.
  4. Increase in steps of1 Goor2 Goonly if the heap stays close to the limit. Do not change three settings on the same evening.

The Starmine panel avoids manually changing the flags

-Xmsand-Xmx, restarting via SSH and rereading raw logs to verify allocated memory. On this point, it mainly avoids input mistakes between4096Mand4G.

 

Reducing the RAM needed without breaking the server

Start with what inflates memory. In

server.properties, keepview-distance=8while the world grows fast. Keepsimulation-distance=6for standard survival, andsimulation-distance=4if bases have many villagers, farms and mobs. The limit becomes bad when players complain only that crops are growing too close, not when the mountain in the distance looks less sharp.

 

On Paper, open

paper-world-defaults.yml. Entity, despawn and activation settings change the load more than+2 Gof RAM. On Purpur,purpur.ymlgives even more levers, but test one setting at a time. A value copied without understanding can break a farm or change mob behavior.

 

Pre-generate chunks if your community explores a lot. A tool like

Chunkyrunsc hunky radius 5000then/chunky start. This does not always reduce peak RAM, but it removes generation spikes and disk writes during evenings with20players. To choose an offer, start from a consistent tier, then adjust when measurements call for it, not when a modpack sheet promises a magic number. The ranges published on pricing are a starting reference, not a population guarantee.

 

Frequently asked questions

Is 4 Go of RAM enough for a Minecraft server?

Yes, 4 Go is often enough for a Paper or Purpur server with a small community and settings like view-distance=8 and simulation-distance=6. It is not a guarantee: a modpack, a large mob farm or massive exploration can exceed this limit.

Why does my server lag even though there is free RAM left?

Lag often comes from the CPU, entities, chunks, redstone or a plugin blocking the main thread. Minecraft targets 20 TPS, so a tick should stay around 50 ms. If ticks go over that duration, adding RAM does not fix the cause.

How much RAM is needed for a modded Minecraft server with friends?

For a small pack, often start around 4 to 6 Go. For an intermediate pack, 6 to 8 Go is a more realistic starting point, and large packs usually start around 10 to 12 Go. The mod count alone is not enough, because dimensions, machines and worldgen change the load a lot.

Should Xms and Xmx be set to the same value?

On a machine dedicated to the Minecraft server, setting Xms and Xmx to the same value often stabilizes Java allocation, for example -Xms4G -Xmx4G. On a machine that also hosts a database, a proxy or other services, leave enough memory for the system and watch actual usage.