Guides / RAM
How to reduce Minecraft server RAM usage
Seven changes that cut a Minecraft server's memory use, from view distance to pre-generation.
Updated
If your server is running out of memory, these changes help most, roughly in order of impact.
- Lower view distance. Drop
view-distancein server.properties to 8, or 6 on busy servers. This alone can cut chunk memory by more than half. - Lower simulation distance. Set
simulation-distanceto 6 or lower. Players still see far, but fewer chunks tick. - Switch to Paper or Purpur. If you run vanilla, Paper uses less CPU and has extra settings for entity and chunk limits. Your world carries over.
- Pre-generate the world. Use the Chunky plugin or mod to generate chunks before players join. Generation spikes both memory and CPU.
- Set a world border. Lower
max-world-sizeor use/worldborderso the world can't grow forever. - Limit entities. Big mob farms and item piles are a common cause. Paper lets you cap entities per chunk.
- Remove unused mods and plugins. Each one stays loaded whether players use it or not.
Use the right flags
Without tuned garbage collection, Java holds on to memory longer and cleans up in bigger, more noticeable pauses. Generate Aikar's flags with the startup flags generator.
Check your settings
Paste your server.properties into the server.properties generator to see each setting explained, with warnings for anything that costs a lot of performance.