Direct answer

Start profiling while the lag is happening with /spark profiler start, then finish with /spark profiler stop to open the results. The profiler helps identify where time is being spent, rather than guessing which setting causes lag.

How to check it

  1. Record TPS/MSPT, player count, and an exact reproduction window.
  2. Run /spark profiler start immediately before reproducing the issue.
  3. After an adequate representative sample, run /spark profiler stop. Use /spark profiler info if you are unsure whether profiling is running.
  4. Inspect the viewer for the largest contributors and trace the relevant call stacks. Separate tick-thread work, plugin events, chunk processing and GC rather than assuming one cause.
  5. For infrequent spikes, see the official --only-ticks-over flag rather than using an always-on high-overhead trace.

What to change

Fix the confirmed hotspot, ideally on a staging server, by changing one variable at a time. Profile again under comparable conditions. Do not remove plugins or change farm mechanics solely because they appear somewhere in one sample.

Software and version notes

Use the command prefix described by spark for your actual platform. Profiling on Velocity, modded or multithreaded servers may require a different command prefix or thread selection.

Verify the result

Compare representative profiles and the player-visible symptom, not just an idle TPS figure. Keep a record of configuration changes and revert if the fix creates regressions.

References

These sources were checked while preparing this article. Performance behavior and configuration can change between Minecraft/server-software versions, so verify version-specific settings before applying them.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000