The alpha is open — one month of free server. Apply →
RMDCGames MCRMDCGames MC
Performance

Fixing lag on a modded server: diagnose before adding RAM

The instinct, faced with a modded server that drags, is to add RAM. Most of the time that changes nothing — and sometimes it makes things worse. A slow modded server is almost always limited by how long a tick takes to compute, not by available memory.

Measure first, don't guess

TPS alone tells you there's a problem, not where it comes from. A profiler gives you the real breakdown of where the time goes: which mod, which dimension, which kind of entity is eating the tick. It's the one step that turns "the server lags" into something actionable.

If ticks aren't a familiar concept yet, TPS vs FPS lays the groundwork before going further.

The four most common causes

  • Entities. Oversized mob farms, forgotten livestock pens, dropped items nobody picks up. Every entity costs time on every tick, indefinitely.
  • View distance. Going from 12 to 8 chunks nearly halves the number of simulated chunks. It's the best effort-to-gain setting there is, and the one most often overlooked.
  • A badly behaved mod. Structure generation on every chunk load, recipe lookups in a loop, a scheduled task running far too often. The profiler names them.
  • Disk I/O. Saving the world too frequently, or writing too many chunks at once, produces periodic stutters rather than a steady slowdown.

RAM: useful, but not the way people think

Too little memory causes garbage-collector pauses you can feel in game. Too much memory makes each pause longer, because the collector has more to walk through. There's a comfortable band, and it depends on the modpack more than on the player count: a heavy modpack with three players needs more than a vanilla server with ten.

The starting point comes from the player count; for a heavy modpack, go one tier up. The full reasoning is in the dedicated article.

What not to do

Piling on "optimisation mods" before identifying the cause. They occasionally fix the problem, often do nothing, and add one more variable to debug at the next incident. Measure first; then change one thing at a time, re-checking TPS in between.

For installing and managing modpacks themselves, see the modpacks documentation.

← Back to the blog