The Quest for 20 TPS: Measuring Modded Server Performance

Published on | Updated

How to measure, analyze, and improve your modded Minecraft server's TPS. Covers the spark profiler, MSPT, common modded bottlenecks, and what hardware can and cannot fix.

Mining diamond ore with a pickaxe in a dark Minecraft cave lit by a torch

20 TPS is what every Minecraft server aims for. It means the server finishes every game tick on time, and players do not feel the server dragging behind them. On a modded server, holding 20 TPS is an ongoing job rather than something you set once.

Measuring TPS

Spark Profiler

spark is the tool to use. It runs on NeoForge, Forge, Fabric and Paper, and Paper has bundled it since 1.21 (PaperMC docs).

/spark tps

This prints recent TPS and tick durations. TPS noticeably below 20 means players are feeling it.

/spark profiler start --timeout 300

This samples the server for five minutes, then gives you a link to a report showing what used the tick time. In a modded pack the report usually splits into a few groups:

  • Entities: mob AI, pathfinding, collisions
  • Block entities: furnaces, hoppers, machines from mods
  • Chunk loading and generation
  • Mod logic that runs every tick

MSPT (Milliseconds Per Tick)

TPS tells you the result. MSPT tells you the margin.

The game runs 20 ticks per second, so every tick has 50 ms. If your average MSPT is 45 ms you are still at 20 TPS, but with only 5 ms to spare, and one spike puts you under.

/spark tickmonitor --threshold-tick 50

This reports every tick that takes longer than 50 ms, so you can see when the spikes happen and match them to what players were doing. Without --threshold-tick, the tick monitor reports ticks that are a set percentage slower than average instead (spark command reference).

A rough guide to reading MSPT. The TPS column is plain arithmetic: above 50 ms, TPS is about 1000 divided by MSPT.

Average MSPTTPSWhat it means
under 30 ms20Comfortable headroom
30 to 45 ms20Fine, but keep an eye on it
45 to 50 ms20, with dips during spikesBorderline, start optimizing
50 to 70 msabout 20 down to 14Players notice lag
over 70 msunder 14Lag is obvious to everyone

Common Modded Bottlenecks

Entity Count

Every loaded entity costs CPU time. Modded servers pile them up fast:

  • Item drops from machines and farms
  • Mobs added by content mods
  • Vehicles, projectiles and similar entities

Run the profiler and look at the entity entries. If entities are the biggest slice of the tick, start there.

Fixes: lower mob spawn rates in the mod configs, cap or clear dropped items, and find the farm that produces the most entities.

Tile Entity Processing

Modded machines (Create contraptions, Mekanism machines, Applied Energistics systems) are block entities. They tick on their own every tick, whether anyone is watching or not.

A large AE2 autocrafting setup can easily end up near the top of a profiler report, and several players with big automated bases add up quickly.

Fixes: limit the number of parallel crafting jobs, and use the mod's own config options to lower how often machines process.

World Tick

The world itself ticks too: random block updates, crop growth, weather and lighting. Packs that add many biomes and blocks can make this heavier than in vanilla.

Fixes: lower simulation distance, or as a last resort the random tick speed game rule (randomTickSpeed before 1.21.11, random_tick_speed from 1.21.11 on, per the Minecraft Wiki). Lower random tick speed slows crop growth for everyone.

Hardware Impact

Most of the tick work in Minecraft, NeoForge and Fabric runs on one main server thread. That makes single-core speed and cache more important than core count: a CPU with fewer, faster cores often does better for one Minecraft server than a server chip with many slower ones.

If you want to know what a CPU change does for your pack, test it the same way you test a setting. Take a copy of your world, keep the pack version, Java flags and player activity the same, run the spark profiler on both machines and compare median and 95th percentile MSPT. Anything else is a guess.

On Space-Node the CPU depends on the location and tier. Premium in the Netherlands, Germany, Poland and Canada runs on an AMD Ryzen 9 9950X with DDR5, Standard is an AMD EPYC 7443 with DDR4 in the Netherlands, Germany and Poland and Ryzen 9 3900X-class with DDR4 in Canada and India, the USA locations use a Ryzen 9 7950X3D, and Singapore and Australia use a Ryzen 9 5950X. The plan selector shows the CPU for each location before you order.

The 80/20 Rule of TPS

In practice, most of your TPS problems come from a small part of what happens on your server. The spark profiler finds that part quickly. Usually it is one player's redstone farm, one mod spawning too many entities, or one misconfigured plugin.

Find the biggest offender, fix it, and measure again. Good performance is something you keep checking, not a one-time setup.