java-topology/tools/mc-bench
2026-03-27 19:16:28 -04:00
..
bench-server.sh wave15: v8-0002/0003 Intl+revectorizer (125x/25x) + bullet/box2d ticket files — 528/240 2026-03-27 19:16:28 -04:00
gen-modpack-tags.py undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
raw-connect.mjs undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
rcon.py undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
README.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
sim-players.mjs undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00

mc-bench — Minecraft Server Load Benchmark

Benchmarks vanilla vs patched Minecraft server-26.1 under simulated load.

Setup

# JDK 25 required
JAVA=/tmp/jdk25/bin/java
# Server jar (bundler)
SERVER_JAR=/home/fox/Downloads/server.jar
# Install both servers
bash bench-server.sh vanilla 40
bash bench-server.sh patched 40

Tools

File Purpose
bench-server.sh Full benchmark: startup + /reload + bot wave
gen-modpack-tags.py Generates synthetic depth-N diamond tag data
raw-connect.mjs Raw TCP handshake bot (version-agnostic)
sim-players.mjs mineflayer bot runner (requires matching protocol version)
rcon.py RCON command injection

What it measures

  • Startup time (wall clock, JVM launch → "Done")
  • /reload time (RCON-triggered, measures tag reload)
  • Connection capacity (how many handshakes the server accepts simultaneously)
  • Handshake latency (p50/p95/max)

Notes

  • Real-world improvement requires a genuine modpack with tag depth ≥ 10.
  • Synthetic tag data uses HashMap iteration (hash-ordered), which may not trigger worst-case DFS. Real modpacks load tags alphabetically (base before root) which reliably triggers the exponential in vanilla.
  • See tests/bench/LoadSimBenchmark.java for controlled algorithmic benchmark.