Docs · What your modpack costs

In STYGION Keystone

What your modpack costs

A load test on your own machine: how many people it holds, what gives out first, and which mod the time goes into.

Updated

"How many people does this server hold?" is a question every owner has, and most of them find out on the evening it matters. This answers it on a Tuesday.

/keystone test 20

It measures the server doing nothing for half a minute, places test players in groups, waits for each group to settle, and finishes with a sentence you can read out loud:

this machine held all 20 players (20.0 TPS at the end, 47.11 ms at the 95th);
every ten players cost about 8.55 ms a tick; at 20 it was using 47.11 ms
of the 50 a tick allows, leaving 2.89

/keystone test stop ends a run early; the test players are removed either way.

What is measured, and why like this

The empty server first. "The tick took 34 ms" means nothing on its own — every number in the report is a difference from this machine, this pack, this world, today.

Test players stand far apart. This is the part that makes it work. A server only ticks the world around players, out to whatever simulation-distance says — and twenty people in a huddle hold about as much world as one does. Real players are spread across a map and each one drags their own piece into the tick. So the ring is derived from how far your server actually ticks, wide enough that no two areas touch.

Measured on one 401-mod server the day this was fixed: 10 block entities before, 29,815 after. Same pack, same machine — the players were simply standing where players actually stand.

Arriving and standing are two different numbers. A player joining makes the server load the world around them; a player standing there makes it tick what is already loaded. The report keeps them apart, because "it holds sixty" would otherwise hide that every join is a half-second stall — which is the thing players feel, and a completely different fault to fix.

What gave out first

The closing sentence names what ran out: the processor, memory, the garbage collector, or chunk loading. Those are four different problems with four different answers, and knowing which is most of the work. All four hide behind one slow tick.

Which mod the time went into

The profile samples the server thread and attributes each sample to the mod that owns the class at the top of the stack — so "your tick takes 20 ms" becomes "12% of it is this mod".

Two numbers, because they are two questions:

  • Share of the tick — what a mod costs when everything is fine. That is the answer to "what is eating my performance".
  • Share of the late time — whose code was running while the server was over budget. Empty on every healthy server, which is most of them, and that is why it is not the headline.

Sharing a run

It asks after a run. Say yes and this is what goes, and nothing else: what was loaded, what the machine is, and what happened. No server name, no address, no player, no id of any kind — not even a random one. You get back the address where it landed on stygion.eu/performance.

Why it is worth doing: nobody knows what modpacks cost. "Give this pack 8 GB" gets copied between forum posts and was never measured by anybody. With enough runs, that page answers "will my machine hold this pack and twenty people" by measurement rather than by guess — and answers which JVM flags actually keep the collector quiet.

Alongside it, five minutes of ordinary play goes once a day. No synthetic load imitates what players have built in a pack; this does. Turn it off with:

/keystone set bench.share-live false

And emptying bench.send-to stops even a run you would publish by hand.

Things worth knowing

  • Do not run it straight after a restart. The server is still finishing its boot and the test will measure that as its answer.
  • Test players are always removed at the end, however the run finishes — including when you stop it and when the server shuts down under it.
  • Nothing they do is written to your world.
  • Two runs are only comparable if the same generation of measuring produced them. The generation travels with every run and the public figures never mix them: when the measuring improves, old runs are not thrown away, they are simply counted separately.

Did this page help?

Opens the feedback panel with this page attached, and lands in the same queue as everything else.