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.

  1. Lower view distance. Drop view-distance in server.properties to 8, or 6 on busy servers. This alone can cut chunk memory by more than half.
  2. Lower simulation distance. Set simulation-distance to 6 or lower. Players still see far, but fewer chunks tick.
  3. 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.
  4. Pre-generate the world. Use the Chunky plugin or mod to generate chunks before players join. Generation spikes both memory and CPU.
  5. Set a world border. Lower max-world-size or use /worldborder so the world can't grow forever.
  6. Limit entities. Big mob farms and item piles are a common cause. Paper lets you cap entities per chunk.
  7. 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.

Work it out for your server

The free RAM calculator gives you the exact settings for your setup.

Open the RAM calculator →