TPS vs MSPT: how to read Minecraft's tick numbers

How to read MSPT on a hosted server with /spark tps, /tick query and Paper's /mspt, what the numbers mean, and why 20.0 TPS can still stutter.

Omne TeamUpdated Nov 17, 20267 min read

Quick answer On a hosted server, F3 will not show you tick time. Run /spark tps, or /tick query on Java 1.20.3 and newer. The number to watch is MSPT, the milliseconds one tick takes: the server holds 20 TPS only while MSPT stays at or under 50 [1]. TPS is the result and MSPT is the cause, so a server can read a calm 20.0 TPS while individual ticks are already running long.

F3 will not tell you anything on a hosted server

Plenty of guides say to press F3 and read the tick time. That works in singleplayer and when you host from your own game. The Minecraft Wiki is explicit that the F3 MSPT value (“ms ticks”) and the TPS graph (F3+2) are available only as a multiplayer host or in singleplayer, because they come from the integrated server inside your game [1]. Connected to a dedicated server, F3 is not showing you that server’s tick time.

So you need a command. There are four, and they overlap.

Command Where it exists Permission What you get
/spark tps Paper (bundled), or any server with spark installed spark or spark.tps [5] TPS over 5s, 10s, 1m, 5m, 15m, plus min/median/95th percentile/max tick duration over 10s and 1m [8]
/tick query Vanilla Java, 1.20.3 and newer Operator level 3 [2] Tick status, target tick rate, average time per tick, percentiles [2][3]
/mspt Paper Not stated on that page [4] Average, min and max MSPT over the last 5, 10 and 60 seconds [4]
/tps Paper Not stated on that page [4] TPS averaged over 1, 5 and 15 minutes [4]

I would use /spark tps everywhere it exists. It has the spike columns the other three lack, and Paper’s own docs say /mspt and /tps are superseded by it [4]. Use /tick query on plain vanilla with nothing installed. One caveat on the Paper rows: the commands page is labelled for Paper 1.21.8, and I did not check that /tps and /mspt are unchanged on 26.x [4]. spark’s install page says Paper 1.21 and newer bundles it, so there is nothing to install [14]. The spark profiler post covers what to do once you know you are lagging.

Reading a /spark tps readout

This is the layout spark prints, from its source [8]. The numbers are an example, your values will differ:

TPS from last 5s, 10s, 1m, 5m, 15m:
20.0, 20.0, 20.0, 20.0, 20.0
Tick durations (min/med/95%ile/max ms) from last 10s, 1m:
4.1/8.7/22.4/68.0;  3.9/8.5/21.9/112.3

Read the tick durations first. The median is 8.5 ms, so the server finishes a typical tick in about a sixth of its 50 ms budget. The 95th percentile is 21.9 ms, still comfortable. The max is 112.3 ms: one tick in the last minute took more than two ticks’ worth of time.

One 112 ms tick among roughly 1,200 in a minute barely registers in a TPS average, which is why the 1m figure still reads 20.0. spark’s guide makes the same point: the values are averages, and extreme ticks get averaged out [7]. A player near whatever caused it felt a hitch of about a tenth of a second. The TPS line says healthy and the max column says there was a spike.

spark colours these values green, amber or red [6]. Per its source, a tick duration turns yellow from 80% of the ideal tick duration (40 ms at 20 TPS) and red at 50 ms or more, while TPS turns yellow at 18 or below and red at 16 or below [8][9]. Those are spark’s cutoffs, not a Mojang rule.

What /tick query prints

/tick query is documented as outputting the current ticking status and target tick rate, with the average time per tick and percentiles [2]. The wording comes from the 26.3 language file [3]:

The game is running normally
Target tick rate: 20.0 per second.
Average time per tick: 9.2ms (Target: 50.0ms)
Percentiles: P50: 8.7ms P95: 21.9ms P99: 41.0ms. Sample: 100

The strings are real [3]. The line order, the numbers and the sample size are an example, so do not treat them as a promise about your output. When the server cannot keep up, the status line reads “The game is running, but can’t keep up with the target tick rate” [3]. That is the quick yes or no. The percentile line tells you whether it is every tick or a few.

Why TPS falls when MSPT passes 50

The server runs a tick, then waits for the next 50 ms slot. If a tick finishes early it sleeps for the remainder. If it runs long, the next tick starts late, because ticks cannot overlap [7]. When ticks keep running long, fewer of them fit in a second and TPS drops [1][7]. spark’s own example: ticks that range from 20 ms to 100 ms, with only 16 completed in a second, report as 16 TPS [6].

When every tick is over budget, TPS is roughly 1000 divided by the tick time in milliseconds. That is arithmetic, not a measured rule. TPS 15 means ticks are taking about 67 ms each, and TPS 10 means about 100 ms.

Sleep time doubles as a headroom gauge. In spark’s example profile the server thread spends 81% of its time waiting for the next tick, which spark calls healthy spare capacity. Under 20% sleep the server is working pretty hard, and under 5% it is probably lagging with no spare capacity [7]. Twenty percent sleep works out to an average tick of about 40 ms.

The 20 ms average with a 300 ms tick

spark’s guide describes this exact case: most ticks take 20 ms, a few take 300 ms, and the averages hide it. That is the signature of lag spikes, as opposed to uniformly bad performance [7]. Two spark tools exist for it [10]:

  1. /spark tickmonitor reports ticks that run well above the average. The default threshold is a 100% increase (twice the average), and /spark tickmonitor --threshold-tick 50 reports any tick over 50 ms [5][10].
  2. /spark profiler start --only-ticks-over 150 records only samples from ticks longer than 150 ms, so normal ticks do not dilute the spike [5][10].

Which number to chase

  • TPS below 20 and median MSPT high. The server thread is saturated. Profile it with spark. This is real per-tick work.
  • TPS fine, max or 95th percentile high. Spikes. Run /spark tickmonitor, line the alerts up with what players were doing, then profile with --only-ticks-over [10].
  • TPS fine, MSPT fine, players still complain. The tick loop is not your problem. spark has /spark gcmonitor for garbage collection pauses [5][11] and /spark ping for player round-trip times [5]. Check those before touching settings.

What usually pushes MSPT up

The Minecraft Wiki lists the usual causes of server-side lag [1]:

  • Hoppers. They constantly search for items above them. Covering a hopper with any solid block, except bee nests and beehives, stops that check. Composters work too, and the wiki calls them even better for performance than a solid block [1].
  • Redstone, especially dust, because it causes block updates and light updates [1].
  • Large numbers of mobs, through AI and pathfinding [1].
  • A high random tick speed. In Java the setting is a game rule, default 3, set with /gamerule random_tick_speed <value> on 1.21.11 and newer. Older Java versions call it randomTickSpeed, because 1.21.11 renamed all game rules to snake case [1][13]. The hyphenated random-tick-speed is not a valid name, and no such key appears on the wiki’s server.properties page [12]. Bedrock calls it randomTickSpeed and defaults to 1 [1].

More RAM does not shorten a tick. That is my reasoning, not a sourced claim: a tick is CPU work on one thread, and the CPU clock speed post covers why that thread’s speed is what counts. Settings can shrink the work per tick, and simulation distance is the usual one.

When TPS reads 40

If a server shows 40, or 5, with nothing wrong, run /tick query and read the target tick rate. Since Java 1.20.3 the target can be set between 1 and 10000, with 20 as the default, and /tick freeze, /tick step and /tick sprint exist as well [2]. A frozen server is not lagging. spark reports TPS against the game’s target rate, so the readout follows whatever the command set [8][9].

Questions people ask

Why does my server say 20.0 TPS but still feel laggy?

TPS is an average. spark's guide describes a server that spends 20 ms on most ticks and 300 ms on a few, which looks healthy on average while players feel the long ticks as stutter [7]. Look at the max and 95th percentile tick durations in /spark tps, and run /spark tickmonitor to catch long ticks as they happen [8][10].

Does F3 show MSPT on my hosted server?

No. The Minecraft Wiki says the F3 tick time and the TPS graph are available only as a multiplayer host or in singleplayer, because the numbers come from the integrated server inside your own game [1]. On a dedicated server, use a command instead.

Is Paper's /tps command still the right one?

Paper's docs say /tps and /mspt still work but are superseded by /spark, and that /spark is the only command you should rely on for performance information [4]. That page is labelled for Paper 1.21.8, so check that the commands exist on your build.

My TPS reads 40. Is the server broken?

Run /tick query first, it prints the target tick rate. Since Java 1.20.3 the target tick rate can be set from 1 to 10000, and the default is 20 [2]. spark reports against the game's target rate, not a fixed 20 [8][9].

Sources

  1. Tick (Minecraft Wiki)
  2. /tick (Minecraft Wiki)
  3. Minecraft 26.3 client jar, assets/minecraft/lang/en_us.json (Mojang)
  4. Paper docs: Commands
  5. spark documentation: command usage
  6. spark documentation: TPS and MSPT
  7. spark documentation: the tick loop
  8. spark source: HealthModule.java
  9. spark source: StatisticFormatter.java
  10. spark documentation: finding the cause of lag spikes
  11. spark (GitHub repository)
  12. server.properties (Minecraft Wiki)
  13. Game rule (Minecraft Wiki)
  14. spark documentation: installation