Knowledge base

Minecraft lags although the server is not using all its RAM

Is your Minecraft server lagging although its memory is not used up? Then missing server RAM is rarely the cause. Find out whether the problem is the server, the network or your own computer.

Free RAM is normal. The server does not have to use all the memory of the plan, and more RAM does not help if the bottleneck is something else.

What you need

  • Access to your control panel at game.primehost.dk.
  • Minecraft Java Edition on your computer.

1. Find out where the lag comes from

What you seeLikely cause
Everyone sees blocks coming back and mobs standing stillThe server cannot keep up (low TPS)
Only one player has delayThat player's network or distance to the server
The picture stutters but the world reacts normallyYour own computer (low FPS)

On Paper servers you can type tps in the console. Close to 20 means the server keeps up. On newer Paper versions the command spark profiler can show what takes time.

2. Make the server's job lighter

  1. Lower view-distance and simulation-distance in server.properties, for example to 6–8. See Edit server.properties.
  2. Remove plugins and mods you do not use and test one at a time.
  3. Limit large farms and clusters of animals, items and redstone.
  4. Avoid many players exploring new terrain at once. New chunks are heavy to generate, and a plugin such as Chunky can generate them in advance.
  5. Schedule an automatic restart at a quiet time.

3. Give your own Minecraft more RAM

This only helps low FPS and slow loading on your computer, especially with mods. It changes nothing on the server.

  1. Open the official Minecraft Launcher and choose Installations.
  2. Edit the installation you play with and open More options.
  3. Find the field JVM arguments and change the number in -Xmx2G, for example to -Xmx4G for 4 GB.
  4. Save and start the game with that installation.

Do not give the game all your RAM. Stay at no more than about half of the computer's memory so the operating system has room too.

Common problems

The server uses almost all its RAM

That is a different situation. Read My server is running out of RAM.

The lag only happens when many are online

Lower the distances and check heavy plugins. If that does not help, see the size guide.

Read also

Need help?

If you get stuck, open a ticket and we will help you from there. Please tell us your version and server type and when the lag happens.

Was the article helpful?