← All guides

How to Reduce Minecraft Server RAM Usage (Practical Fixes)

Updated December 3, 2026 · 6 min read

Your panel's memory graph sits at 95%, or worse, the server crashes with OutOfMemoryError when a few friends log on. Before you pay for a bigger plan, it's worth knowing what's actually filling that memory, because a lot of it is under your control. Here are the fixes that make a real difference, starting with the one that surprises most people.

Short answer
A memory graph near full is often normal: Java reserves the heap you give it and doesn't hand it back. What matters is whether the server runs out. To use less memory: lower view-distance and simulation-distance, cut down entities (farms, dropped items), cap entity saves per chunk in Paper, remove heavy or client-only mods, pre-generate the world, and set -Xmx about 1 to 1.5 GB below your plan limit. Giving Java more than you need doesn't help.

First: is your server really short on RAM?

Java manages memory in a big pool called the heap, sized by -Xmx. Java doesn't free memory back to the system the moment it's done with it. It keeps the heap and cleans it up in the background (garbage collection). If your startup flags set -Xms equal to -Xmx (which Aikar's flags recommend), the server claims the full heap at startup.

So a panel graph that says 7.6 of 8 GB doesn't mean the server is in trouble. To see what's really going on, use spark (built into Paper since 1.21; on Fabric, Forge and NeoForge install the spark mod):

/spark health show --memory

This prints TPS, CPU and memory usage, including how much of the heap is actually in use. If heap use climbs, drops after garbage collection and climbs again, that sawtooth is healthy.

You genuinely need to act if you see:

If that's you, read on. If not, your RAM is probably fine and lag is coming from somewhere else, likely CPU. See why your server is lagging.

1. Lower view distance and simulation distance

Loaded chunks are the biggest memory user on most servers, and every player loads a square of chunks around them. The two settings in server.properties that control it:

view-distance=10
simulation-distance=10

Both default to 10. view-distance controls how many chunks are sent to players, and simulation-distance controls how far away the world actually ticks (mobs move, crops grow). Because the area grows with the square of the distance, small changes add up. Going from 10 to 8 cuts the area by roughly a third.

Good starting points:

Server view-distance simulation-distance
Small friends SMP 8 to 10 6 to 8
Busy plugin server 6 to 8 4 to 6
Heavy modpack 6 to 8 4 to 6

Players with a mod like Distant Horizons or Bobby can still see far on their own screen, and lower simulation distance mostly affects far-away farms. More detail: view and simulation distance explained.

2. Cut down entities

Every mob, dropped item, arrow and XP orb is held in memory and processed every tick. Servers collect them quietly: animal pens nobody culls, mob farms with no kill chamber, item piles from overflowing hoppers.

Paper: cap how many entities a chunk can save

Paper has a setting that stops a single chunk from saving thousands of the same entity, which is how lag machines and broken farms bloat a world. In config/paper-world-defaults.yml:

chunks:
  entity-per-chunk-save-limit:
    experience_orb: 16
    arrow: 16
    snowball: 8
    ender_pearl: 8

The default is -1 (no limit). Only add entity types you're comfortable capping; don't cap mobs players care about, like villagers.

3. Remove heavy and unneeded mods or plugins

On modded servers, the mods themselves are often most of the RAM. Every mod's blocks, items, recipes and worldgen live in memory from startup.

4. Pre-generate the world

Generating new terrain is much more expensive than loading chunks that already exist, and when several players explore in different directions at once, memory and CPU spike together. Pre-generating with a tool like Chunky does that work in advance, at a controlled pace, so exploring later just loads saved chunks.

Run it when the server is quiet, because the pre-gen itself is busy while it works. Full steps: how to pre-generate your world. Adding a world border keeps the world from growing past the area you generated.

5. Set -Xmx correctly (and not too high)

-Xmx is the heap limit, but Java also uses memory outside the heap for threads, loaded classes and native code. If the heap plus that overhead goes past your plan's real limit, the system kills the server with no Java error at all.

Setting RAM higher than you need doesn't make the server faster. If the heap is huge but mostly empty, you're just making garbage collection deal with a bigger space. Our RAM sizing guide has realistic numbers by server type.

6. Smaller things that help

On FreaksMC you can change these settings from the panel's Files tab and check memory use from the Console.

Quick checklist

  1. Check real heap use with /spark health show --memory, not just the panel graph
  2. Lower view-distance and simulation-distance
  3. Cull animals, fix farms, clear item piles
  4. On Paper, add an entity-per-chunk-save-limit
  5. Remove client-only and unused mods; consider FerriteCore and ModernFix
  6. Pre-generate the world and set a world border
  7. Set -Xmx 1 to 1.5 GB under your plan's limit, and not higher than you need

Want a server that just runs fast?

FreaksMC servers run on AMD Ryzen 9 7950X3D processors with fast NVMe storage. Pick vanilla, Paper or a modpack and your server is ready in minutes.

See plans from $4/mo

We use cookies for analytics & ads to measure how our site performs. Essential cookies always run. See our Privacy Policy.