01 Use a profiler when the symptom is happening
A spark report is most useful while the reported lag is occurring. An empty server sampled at midnight cannot establish why a busy base stalls during the evening session. Record the server build, player count, relevant activity, symptom time and whether clients also have low frame rates.
Paper documents built-in spark from 1.21 onward ↗. On another platform, use spark’s compatible mod or plugin release instead of putting a Paper plugin into an arbitrary loader. Check whether spark is already provided before installing another copy. “spark mod” and “spark plugin” are deployment choices, not two separate fixes.
02 Run a bounded capture
For a compatible Paper setup, the documented example is:
/spark profiler start --timeout 600That collects ten minutes and returns a report link. Reproduce the normal activity during the capture. In a panel console, omit the leading slash where that console expects commands without it. Keep the report alongside the workload notes instead of sharing a link with no context.
Inspect report contents before publishing them. Profiles and linked diagnostics can reveal plugin names, paths or other operational details. Share a sanitized report with the relevant maintainer or support team, and never add account passwords just because someone asks for “full diagnostics.” The command is a documented example, not a claim that we ran a benchmark on your game server.
03 Interpret evidence without blaming the largest label
| Observation | Useful next check |
|---|---|
| Cost grows during new terrain exploration | Compare an already-generated route and consider bounded pregeneration. |
| Repeated work appears in an established base | Reproduce with the same entities, machines or plugin action. |
| Memory pressure and garbage collection rise together | Inspect allocation and workload; do not infer a leak from one large heap number. |
| Only one client has poor frame rate | Check that client’s rendering path separately. |
A method appearing on a stack can be called by something else; a large category alone is not proof a particular plugin is defective. Take the linked report and reproduction notes to its author before deleting several components. Capture the same workload again after one change.
04 Choose the fix that matches the bottleneck
Chunky targets advance terrain generation; it does not replace profiling of an active machine-heavy base. Client shader checks address a different rendering workload. RAM expansion can help a genuine memory limit, but does not automatically reduce work performed by a slow tick.
Keep a before/after record with the same game build, workload duration and major settings. If several variables changed, state that the result cannot isolate one cause. Revert changes that do not help instead of building an undocumented collection of “optimization” flags.