How to profile a Minecraft server with spark

spark lets you see where the game server is spending processor time. If you get the report while the problem is occurring, your chances of getting the right job increase.

Step by step

  1. Verify that spark is available on the server and that you are authorized to run the profile command. Some versions of Paper may have the tool built-in.

  2. Run /spark profiler start --timeout 60 while the problem persists. If you want to stop manually, use /spark profiler stop.

  3. Examine the main server thread and high share branches in the report. Automatically counting a long wait or idle time as a plugin error.

  4. Change the relevant setting in the test environment and get a second profile in the same scenario. Compare two reports with the same player load.

Keep in mind

Before sharing the report link externally, check if it contains server information.

Source and tools