How Much RAM Does a Minecraft Server Need? By Player and Mod Count
How many GB of RAM does a Minecraft server need? A RAM table by player count for Vanilla, Paper with plugins and modded servers, plus the -Xmx setting, the impact of view distance and how to measure whether your RAM is really enough.
The most common question from people who want to start a Minecraft server is: "How many GB of RAM should I get?" The answer is not a single number; player count, server software (Vanilla, Paper, Fabric, Forge), the number of plugins and mods, view distance and how much of the world has been explored all change how much RAM you need. In this article we explain, with example tables, how to work out the right amount for your own server. For setup steps, see our Minecraft server setup guide.
Short answer: For a plugin-free Java server played by a few friends, allocating 2–3 GB to Minecraft is enough (4 GB of total RAM on the server). A server with plugins and 10–20 players needs 4–6 GB, and modpacks need 6–10 GB or more. Do not give all of the server's RAM to Minecraft; leave 1–1.5 GB for the operating system.
RAM table by player count and server type
The values below are the memory you allocate to Minecraft (Java), i.e. the -Xmx value. The server's total RAM should be 1–1.5 GB more than this.
| Server type | Players | RAM for Minecraft | Total server RAM |
|---|---|---|---|
| Vanilla or Paper, no plugins | 2–5 | 2 GB | 3–4 GB |
| Paper, a few plugins | 5–15 | 3–4 GB | 4–6 GB |
| Paper, many plugins (economy, map, protection) | 15–30 | 5–6 GB | 8 GB |
| Light modpack (Fabric/Forge) | 2–10 | 4–6 GB | 6–8 GB |
| Large modpack | 5+ | 6–10 GB | 8–12 GB |
This table is a starting point. With the same number of players, players roaming far apart in the world use much more memory and CPU than all of them standing in the same village, because the server keeps the area (chunks) around each player in memory separately.
Five things that increase RAM needs
- View and simulation distance: The
view-distanceandsimulation-distancevalues inserver.propertiesdetermine how many chunks are kept in memory for each player. Lowering these values a little noticeably reduces RAM and CPU load. - Mods and plugins: Mods add new blocks, entities and world generation; modpacks can use several GB of memory before anyone even joins.
- Unexplored world: As players move into new areas, the server generates the world on the fly. This strains both the CPU and memory. On servers with plugins, you can handle this load before players arrive with world pre-generation plugins.
- Lots of entities: Large animal farms, automatic farms and items lying on the ground consume memory and CPU.
- Server software: Optimized server software such as Paper usually runs more smoothly with fewer resources than the standard (vanilla) server at the same player count.
How to set -Xmx and -Xms
When starting the Minecraft server, you tell Java how much memory it may use:
java -Xms3G -Xmx3G -jar server.jar nogui
-Xmx: The maximum memory Java can use.-Xms: The memory allocated at startup. On servers it is common to set both to the same value.
Common mistake: Writing -Xmx4G on a server with 4 GB of RAM. Java itself, the operating system and any database also use memory; eventually the system runs out of memory and the server crashes or the operating system kills Minecraft. On a 4 GB server, -Xmx3G or -Xmx2G is safer.
Second mistake: Giving more memory than needed on the assumption that "more is better." Extra RAM does not fix lag by itself; the source of lag is usually the CPU, a slow plugin or world generation.
How to tell whether your RAM is enough
Measure instead of guessing:
- TPS (ticks per second): Minecraft aims for 20 ticks per second. On Paper you can check it with the
/tpscommand. If TPS stays below 20, the server cannot keep up; but the cause may be the CPU rather than RAM. - spark plugin/mod: With the spark tool, which works on Paper, Fabric and Forge, the
/spark healthcommand shows memory and CPU usage, and/spark profilershows which plugin is causing the load. - On the server side: Monitor the system's total memory usage with
free -handhtop. For these commands, see our article on server management commands.
Java's memory usage fluctuates as the garbage collector runs; this is normal. The problem is when memory is constantly hitting the ceiling and garbage collection frequently pauses the game.
As important as RAM: the CPU
The main game loop of a Minecraft server runs largely on a single core. That is why a server with 8 GB of RAM but a shared CPU that frequently has to wait its turn can perform worse than one with 4 GB of RAM and a dedicated CPU. For game servers, choose a VDS with a CPU reserved for you. Swap space does not replace RAM; it only provides a safety net during sudden spikes (swap setup guide).
Which plan should you choose?
For players to connect to your server directly (default port 25565), you need a dedicated IPv4 address. Our game server plans come with one; all of them include dedicated vCPU on an Intel Core i5-10400F, guaranteed RAM, root access, unmetered speed and 3 TB of traffic per month:
| Plan | vCPU / RAM | Monthly | For Minecraft |
|---|---|---|---|
| Oyun VDS 1 | 2 / 2 GB | $4.06 | Very small, plugin-free test server |
| Oyun VDS 2 | 2 / 4 GB | $5.49 | Group of friends, Paper with a few plugins |
| Oyun VDS 3 | 2 / 8 GB | $6.99 | Server with many plugins or a light modpack |
| Oyun VDS 4 | 4 / 8 GB | $9.59 | More cores with the same memory; for world generation and extra services |
For large modpacks, you can check the VDS Enterprise plans, which come with 12 GB of RAM and a dedicated IPv4 address, on the VDS plans page. Our recommendation: Start small, measure with spark and htop for a few days, and move up a plan if needed.
Frequently Asked Questions
Is 2 GB of RAM enough for a Minecraft server?
It is barely enough for a plugin-free test server with a few players; but since you also need to leave room for the operating system, you can only allocate 1–1.5 GB to Minecraft. For a server that will be played regularly, we recommend 4 GB of total RAM.
How much RAM does a 10-player Minecraft server need?
With Paper and a few plugins, allocating 3–4 GB to Minecraft for 10 players is usually enough; the server's total RAM should be 4–6 GB. If you use a modpack, the requirement goes up.
How much RAM does a modded Minecraft server need?
It varies a lot by modpack. Light packs run with 4–6 GB, while large packs may require 8–10 GB or more. Check the server memory recommended by the modpack's publisher and add 1–1.5 GB on top for the system.
Does a Bedrock server need the same amount of RAM?
No. Bedrock Edition server software does not run on Java, so it usually runs with less memory at the same player count. The values in this article are for Java Edition.
Will adding RAM fix lag?
Only if the problem really is a lack of memory. Most lag comes from the CPU, a slow plugin or generating new chunks. Check TPS and the spark report before adding RAM.
You might also like
Set up a Minecraft Java Edition server for you and your friends from scratch on Ubuntu 24.04: Java 21, server....
Manage Minecraft, CS2, Rust and other game servers from your browser with the free, open-source Pterodactyl pa...
Planning a Metin2 server but unsure whether a VPS is enough or you need a VDS? We compare shared vs dedicated...