Skip to Content
MineDuels

Performance and Spark

Tune MineDuels for stable MSPT, read Spark profiles, and fix common spike causes.

MineDuels is built for fast arena copies and live UI (scoreboard, tab, nametags). Under load, most multi-second MSPT spikes come from chunk loading, arena paste/reset, server restart, or host contention, not from nametag packets alone.

This guide is for owners who use Spark or similar profilers. It explains what to expect in profiles and which settings to change first.


How to read Spark for MineDuels

SignalWhat it usually means
Low steady % for dev.mineduels on the server threadNormal with displays enabled. Timers and match logic run every tick or on intervals.
High % only during /md reloadReload merges YAML and rebuilds displays. Take a profile after reload finishes.
Spike at Done! or plugin enableStartup: database drivers, PacketEvents mappings, other plugins (LuckPerms is a common multi-second enable).
Spike when many players queue at onceArena copies go to PASTING, teleports load chunks, several matches may start in the same few ticks.
Chunks loaded jump by hundreds or thousandsStrong hint the tick was world I/O, not hologram text.

Percentage beats the label. Seeing MineDuels in the tree does not mean it caused a 2 s tick unless its slice is large for that tick.

Profiling windows that mislead you

Avoid starting Spark in the same minute as:

  1. Full server restart (first 30 to 120 seconds after joinable).
  2. Mass bot join + mass /md queue (stress tests).
  3. First open of every GUI on a cold JVM (menus compile layouts once).

For a fair baseline: stable player count, arenas already READY, wait two minutes, then profile 5 to 10 minutes of normal queue play.


Priority checklist (single-server)

PriorityActionWhy
P0Keep warm arena copies (arenas/*.yml → copies.min, pool not empty)Matchmaking blocks on ready copies; cold paste on match start loads chunks.
P0Pre-paste at boot or low traffic; fix copies stuck on PASTINGPaste and reset are heavy; wedged copies stall queues.
P0Stagger stress tests (bots joining and queuing in the same second)Many teleports to the grid world in one tick multiply chunk work.
P1database.yml → performance.async-displays: trueScoreboard/tab/nametag text work can run off the main thread where supported.
P1Tune nametags (update-ticks, placeholder-cache-seconds, reconcile-ticks)Heavy PlaceholderAPI or LuckPerms in tag lines cost lookups, not missing packet mode.
P1matchmaking.yml → queue.actionbar.enabled: false if you do not need itRemoves periodic action bar work for everyone in queue.
P2config.yml → arena budgets (budget-ms, parallel-work, parallel-resets)Spreads paste/reset work. See config.yml arena.
P3Lower scoreboard/tab update-ticks only after arenas and host are healthyFaster UI refresh increases display work linearly.

Arena copies and chunks

Each kit needs at least one arena template linked and ready copies in the pool (instances.yml is internal state).

Copy pool (arenas/<id>.yml)

copies:
  min: 2    # try to keep this many READY copies
  max: 4    # upper cap for this template
  • min: MineDuels tries to maintain this many idle copies. Higher min uses more grid cells and memory, but reduces paste-on-demand when queues pop.
  • max: Hard cap per template.
  • If every copy is IN_USE or PASTING, queue matchmaking waits (matchmaking does not pair without a ready arena).

Grid world (config.yml → arena)

  • spacing must fit the largest template (often 512+ on Folia).
  • budget-ms, parallel-work, and parallel-resets spread work across ticks. Defaults are safe; lower budgets smooth ticks but slow resets.

Typical spike pattern (many players queuing)

  1. Queue pairs players.
  2. Copies transition paste → reset → teleport.
  3. Chunk count rises sharply (hundreds to thousands of new chunks in one window).
  4. MSPT max spikes; median MSPT may stay low.

Mitigation: raise copies.min for busy kits, pre-generate or keep the arena world loaded, avoid running soak tests immediately after restart.

Details: Creating kits and arenas, kits/ and arenas/.


Displays: scoreboard, tab, nametags

All three read YAML on /md reload and refresh on timers.

FileDefault intervalNotes
scoreboard.ymlupdate-ticks: 20Sidebar per player state
tab.ymlupdate-ticks: 20May refresh faster when an animation line needs it
nametags.ymlupdate-ticks: 40Hologram mode uses PacketEvents; see Nametags UI

With database.yml → performance.async-displays: true, much of the string building for displays can run on MineDuels' display thread. Packets for hologram nametags still send from the main thread when something visible changes (health, sneak, teleports, line text).

Nametags and Spark

In hologram mode, tags are packet-based (no scoreboard teams). Spark may still show NameTagService or hologram classes on timer ticks because:

  • Lines with static MineDuels keys still reconcile on update-ticks.
  • Lines with external placeholders (rank prefix via PAPI) hit PlaceholderAPI and permission plugins.
  • hologram.reconcile-ticks (default 400) re-checks every viewer (vanish plugins, tracking).

Tuning:

  • Increase update-ticks (e.g. 40 → 60) for busier hubs.
  • Set placeholder-cache-seconds to 15 to 60 when rank/prefix lines rarely change.
  • Keep reconcile-ticks at 400 unless vanish desync forces lower.

Full keys: nametags.yml.


Queue and matchmaking load

matchmaking.yml → queue:

  • tick-interval: how often the matcher runs (default 10 ticks).
  • actionbar.enabled: updates the action bar for queued players. Disable if unused.
  • multi-queue: more kits queued per player means more matcher work, still small compared to arena I/O.

Ranked widening (ranked.step-seconds, range-step, max-range) only affects pairing logic, not paste cost.


Host and JVM

MineDuels cannot fix an undersized VPS:

  • High system load with no swap increases GC pauses (young-gen collections over 100 ms show up as MSPT tails).
  • Two full Minecraft processes on one host contend for the same cores.
  • Many plugins on the same tick as MineDuels matches amplify spikes (anticheat, tab list plugins, region protection).

Give the arena grid world RAM headroom; monitor chunk cache and entity counts during soak tests.


Startup timeline (what to expect)

On a typical restart with MineDuels + PacketEvents + LuckPerms:

  1. Worlds load.
  2. Plugins enable (LuckPerms and mapping-heavy plugins often take seconds each).
  3. MineDuels may paste or validate the arena grid on first enable or when templates changed.
  4. Only after this window does steady-state profiling apply.

If Spark's maximum MSPT is always at minute zero, fix startup and warm copies before chasing nametag ticks.


SymptomStart here
Copies stuck PASTINGFAQ post-match and arenas + arena section in config.yml
Spark shows MineDuels oftenFAQ performance
TAB conflictsNametags (other-scoreboards, mode: hologram)
Reload lagReload matrix

On this page