How much memory your server needs
Server memory calculator
3 GB
FAQ
How much memory does a Minecraft server need for 10 players?
Vanilla or Paper with a couple of plugins runs fine on 2–3 GB. With more than ten plugins, take 4 GB. A modpack needs at least 4 GB even for a single player.
Why does a modded server need so much memory?
Every mod keeps its blocks, items and recipes in memory, so the amount grows with the size of the pack, not only with the number of players. A pack of 200 mods needs about 8 GB.
Should I take a lot of spare memory?
Headroom of about one and a half times the real usage is useful. More is not: Java cleans memory in pauses, and on a huge heap those pauses get longer and more noticeable.
See also
The calculator uses the same reference points as the “How much memory your server needs” article in the Millida knowledge base: vanilla for five players takes 2 GB, survival with plugins for 20 people takes 4 GB, a project of 40 players or more takes 8 GB, a light Fabric pack of a hundred mods takes 6 GB, and a large modpack of two hundred mods takes 8 GB or more. Every player beyond five adds a little memory: the least on vanilla and the most on mods, because mods keep data for every loaded chunk.
Memory is not the only factor. The Minecraft game loop runs on a single thread, so core clock speed decides whether the server holds 20 TPS. If less than half of the memory is in use and the server still lags, the cause is the CPU, plugins or world generation, not the amount of memory.