# Methodology: ForYouHost Minecraft server performance research

Written before any benchmark result was collected (2026-11-26). Changes made after results came in are
listed under "Changes during the research", with the reason, and are never applied silently.

## 1. Question

How much RAM and CPU does a Minecraft Java Edition server need, for given player counts, server software,
settings and workloads, in the container environment ForYouHost customers actually get?

## 2. Environment

The benchmark ran on ForYouHost's game-server node itself (see `environment.json`): the same virtual
machine, the same Docker engine, the same Java image (`ghcr.io/pterodactyl/yolks:java_25`) and the same
JVM flags customer Minecraft servers use. Benchmark containers are separate, disposable, and never touch
customer containers, files or worlds.

Representativeness, and the differences from a customer server:

| | Customer server (Wings) | Benchmark container |
|---|---|---|
| Image | `yolks:java_25` | same |
| JVM flags | `-Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true` | same, plus the measurement agent (`-javaagent`, via `JAVA_TOOL_OPTIONS`) |
| Memory limit | plan RAM × Wings overhead (×1.15 under 2 GiB, ×1.10 under 4 GiB, ×1.05 from 4 GiB) | same formula, `--memory` = `--memory-swap` (no swap) |
| CPU limit | CFS quota = plan CPU % × 1 000 µs per 100 000 µs period | same quota; **additionally pinned** to 4 logical CPUs (8–11) so runs are comparable |
| Network | Docker bridge, public port | Docker network with `--internal`: no route outside the host, no public port |
| Neighbours | other customer servers on the node | the same, running normally; their load is recorded for every second of every run |

Pinning: production containers float over all 16 vCPUs. The benchmark is pinned to 4 so that results do
not depend on where the scheduler happened to put it; with a 400% quota it can still use all four.

The simulated players run in a separate container pinned to CPUs 12–15, limited to 3 GiB, and its CPU use
is recorded each second, so that it can be checked that the load generator was not the bottleneck.

## 3. Software

Minecraft **26.1.2** for every implementation: the newest version that Vanilla, Paper, Fabric, NeoForge and
the Mineflayer client (protocol 775, shared by 26.1 – 26.1.2) all support. Exact builds and SHA-256 sums
are in `environment.json`. Java: Temurin 25 (the image's).

- Vanilla 26.1.2 (Mojang server jar)
- Paper 26.1.2 build 74 (stable channel)
- Fabric loader 0.20.1, no mods
- NeoForge 26.1.2.130, no mods
- Fabric with server-side optimisation mods (phase 6 only, listed in `configurations/`)

Each implementation runs with its out-of-the-box configuration; only `server.properties` is set, identically:
view-distance 10, simulation-distance 10, difficulty normal, the same seed, online-mode false (private
network, offline clients), RCON on for the runner. Out of the box means, for example, that Paper uses its
own chunk loading and entity defaults; we compare implementations as a customer gets them, and say so.

## 4. World

One world, generated once by Vanilla from seed `-4172144997902289642`, and restored from the same snapshot
before every run, for every implementation:

- `pregen`: the 97 × 97-chunk square around spawn, plus four corridors 25 chunks wide reaching 460 chunks
  along +x, +z, −x and −z, fully generated (each chunk confirmed loaded before release).
- `fresh`: only what the server generates on first start (spawn).

## 5. Measurement

**Ticks.** A measurement-only Java agent (`instrumentation/tickprobe`) wraps
`net.minecraft.server.MinecraftServer#tickServer`, the method every implementation runs once per game tick
and the span the game itself reports as "ms per tick". It logs the end time and duration of **every
tick**, so percentiles are computed from raw ticks, never from averaged rolling windows. Minecraft 26.1 is
not obfuscated, so the same method is hooked by name in all four implementations. Overhead: two
`System.nanoTime()` calls and two map lookups per tick, and once a second an iteration over loaded levels
and entities on the server thread.

**Per second (agent):** heap used / committed / max, non-heap and metaspace, direct buffers, GC count and
pause time (G1 young + old; the concurrent cycle is not a pause), server-thread CPU time, thread count,
loaded chunks, entities, players.

**Per second (host, cgroup v2 of the container):** memory.current, memory.peak, memory.stat (anon, file,
kernel, sock, shmem), memory.events (oom, oom_kill), cpu.stat (usage, throttling), io.stat, CPU/memory/IO
pressure (PSI), Java process RSS and threads, container network bytes, host CPU (busy, steal), host load
and available memory, and the bot container's CPU and memory.

Memory terms are kept apart: *Java heap* (what the JVM uses for objects), *RSS* (resident memory of the
Java process, heap plus everything outside it), and *container memory* (what the cgroup charges, including
page cache, which is what the panel graph shows and what the memory limit applies to).

## 6. Players

Simulated players are real Minecraft protocol clients (Mineflayer 4.39.0, offline mode on the private
network). They are not human; their behaviour is a fixed, seeded schedule, the same in every comparable
run (same seed per repetition number).

- **Idle (A):** no players. Note: since 1.21.2 Minecraft pauses ticking after 60 s with nobody online
  (`pause-when-empty-seconds`, default 60). That is the real behaviour customers get, so it is kept and
  reported; tick metrics of empty servers describe the paused state.
- **Connected, idle (B):** players connect and stand still.
- **Survival (C), the main workload:** every ~2 s (±0.5 s) each player does one action, by fixed weights:
  walk 30%, sprint 15%, mine 20%, place a block 15%, craft/inventory 7%, attack the nearest mob 8%,
  chest 5% (place, open, deposit, close). Each player wanders within 24 blocks of a home point; home points
  are spread within 96 blocks of spawn (a normal small community). Each player gets the same starter kit.
- **Exploration (D new terrain / E pre-generated):** 4 explorers (spectator mode, which loads and
  generates chunks) move outward along the four axes at 8 blocks/s, by server `/tp`, for the whole run.
  D starts from the `fresh` world, E from `pregen`, on identical routes.
- **Entities (F):** 10 survival players next to a barrier pen with 150 passive animals, 50 villagers,
  50 husks and 200 non-despawning item stacks.
- **Distribution (H):** 20 survival players in one base (`grouped`), or each on their own point of a
  600-block ring (`distributed`), against the default spread.
- **Redstone and farms (G):** not run; see limitations.

## 7. Execution protocol (every run)

1. Fresh container from the implementation's template, world snapshot restored, `server.properties` written.
2. Limits applied at `docker run`; the resulting HostConfig is stored with the run.
3. Start-up timed from container start to the server's `Done (` line.
4. Players connect (1.5 s apart), are positioned and equipped over RCON.
5. **5 minutes warm-up, then 10 minutes measured.** Only the measured window is analysed.
6. Stop players, `save-all flush`, `stop`; logs, CSVs and metadata archived; container and work directory
   removed.

Three repetitions (separate JVM start, restored world, interleaved order with a fixed shuffle seed) for every
configuration used in the main conclusions; one for the exploratory view/simulation-distance runs and the
60-minute stability run. Failed, crashed and aborted runs are kept and reported.

Safety: one benchmark at a time; abort and clean up if `/opt/mcbench/STOP` exists, if host available memory
drops below 6 GiB, or host load exceeds 13 (of 16 vCPUs); per-step time-outs.

## 8. Classification (fixed before the results)

Over the 10-minute measured window of a run:

| Class | Criteria |
|---|---|
| Excellent | TPS ≥ 19.8, P95 ≤ 35 ms, P99 ≤ 50 ms, no disconnects, no OOM |
| Acceptable | TPS ≥ 19.5, P95 ≤ 50 ms, P99 ≤ 100 ms, no crash, no OOM |
| Degraded | below Acceptable, or players disconnected |
| Failed | did not start, crashed, OOM-killed, or the workload could not run |

Sustained TPS = ticks completed in the window ÷ 600 s. A configuration is classed by its **worst**
repetition. Memory headroom (container memory vs. limit) is reported separately; a run that passes while
within 10% of its limit is flagged "limited headroom". These are ForYouHost research criteria, not Mojang
standards or guarantees.

## 9. Statistics

Per run: the statistics above from raw samples. Per configuration: the median of the runs, and the
minimum and maximum across runs, with the number of runs. Thousands of ticks from one run are not
independent experiments; no confidence intervals are given for three repetitions. Nothing is extrapolated
beyond the player counts tested.

## Changes during the research

Items 1 to 6 were made during development runs and the Phase 0 pilot, before any Phase 1–7 result existed. Item 7 was found while Phases 1 and 2 were running, items 8 and 9 after the queue finished.

1. **Connection spacing 1.5 s → 4.5 s, for every implementation.** Paper refuses a second connection from the
   same IP within 4 s (`bukkit.yml` `connection-throttle: 4000`); all simulated players share one IP. Paper's
   configuration was left untouched; the spacing is the same for all four implementations.
2. **Empty-server pause.** Development runs showed that an empty 26.1 server stops simulating the world after
   60 s ("Server empty for 60 seconds, pausing") while `tickServer` keeps being called with almost no work.
   Empty-server runs (Scenario A) therefore report memory and CPU, and are classed "paused" rather than given
   a tick-performance class. World *generation* for the snapshots ran with the pause disabled; benchmark runs
   keep the default.
3. **RCON time-out 10 s → 120 s.** RCON commands run on the server thread; under load they wait. A slow answer
   is part of what is measured, not a reason to abort.
4. **Positions.** The world's spawn point for the seed is at about (−451, −438). Players log in there and are
   then moved to their home points, which are laid out around the world origin (0, 0), inside the
   pre-generated area (the 97 × 97-chunk square is centred on the origin and contains the spawn point).
5. **Phase 6 mods: release channel only.** Lithium 0.24.7, FerriteCore 9.0.0 and Krypton 0.3.0. ScalableLux and
   C2ME were available for 26.1.2 only as alpha builds and are not used.
6. **Pilot result kept separate.** The Phase 0 pilot (Paper, 4 GiB, 200%, 5 players) is reported as a pilot,
   not as one of the three repetitions of any configuration.
7. **Player count from the server itself (found during Phase 2, 2026-11-26).** The runner waited for all
   players by parsing the `list` command. On Paper that parse returned 15 however many players were online:
   the server log shows 19 of 20 (and 45 of 50) had joined. Every Paper run with 10 or more players therefore
   "failed" before measuring: 7 runs, set aside in `harness-failed/` and reported, not counted as results.
   From then on the runner uses the measurement agent's count (`getPlayerCount`, the same call for every
   implementation), and a simulated player refused while logging in retries up to 3 times, 5 s apart (a
   player already in the game never reconnects; that stays a disconnect). The 7 runs were run again with the
   fix in a second pass of the queue. No completed run's data was changed.
8. **One shared login queue (found after the queue finished, 2026-11-29).** Most Paper runs with 10 or more
   players still failed before measuring ("only 3/20 players connected"). The simulated players' log shows
   every refusal was Paper's connection throttle. The 4.5 s spacing covered only each player's first
   attempt; a refused player retried 5 s later on its own timer, which collided with other players' logins,
   and each refused attempt restarts Paper's 4 s clock. Now every attempt, first tries and retries alike,
   takes the next slot of one shared queue, 4.5 s after the previous attempt of any player. A refused player now tries up to 8 times instead of 3: on the first rerun one login still reached the server within 4 s of the next (19 of 20 got in), because the moment a connection arrives also depends on how busy the network and the server are. Paper's
   configuration is still untouched, and the queue is the same for all four implementations. The failed
   runs were set aside in `harness-failed/` (reported, not counted) and run again. No completed run's data
   was changed.
9. **Disconnects counted inside the measured window (analysis only, 2026-11-29).** The classification counts
   players lost *during the measured window* (section 8). The analysis read the simulated players' last
   record, which is written after the run has stopped the server, so the shutdown, which sends every
   player off, was counted as disconnects, and so were refused logins that were retried successfully.
   The analysis now reads the counters as they stood at the end of the window and counts only kicks of
   players already in the game. No measurement changed; runs were re-analysed, not re-run.
10. **Phase 8 added: Forge (NeoForge) with more cores or memory (2026-11-29).** Phases 1–3 measured NeoForge only
   at 4 GiB and 200% CPU, so the results could not say whether more resources help it. Phase 8 adds NeoForge
   with 10 and 20 players at 400% CPU (4 GiB) and at 8 GiB (200% CPU), three repetitions each, with the same
   workload, world and protocol as Phase 1. It was added to answer that question, not to replace any result.
