Use Spark to Profile a Server

The best way to determine the cause of lag is to profile the server while the lag is happening. Some modpacks include the Spark mod. If the modpack you're using does not, you can add it to your server. Make sure to use a version that works with your version of Minecraft. There is also a plugin version of Spark here.

Once it is on the server, follow these directions after logging in to your server if you are using a minecraft version higher than 1.12:

  1. Use the command: /spark profiler start
  2. Wait 30 seconds
  3. Use the command: /spark profiler stop
  4. Send support the link that it provides.

If you are using 1.12 or earlier, follow these steps:

  1. Use the command: /spark profiler
  2. Wait 30 seconds
  3. Use the command: /spark profiler --stop
  4. Send support the link that it provides.

If you'd like information on how to read the information in that link, see their documentation.

Sometimes a single profile won't find the cause of the lag because maybe the lag is happening in spikes instead of constantly. In that case, you'd want to follow Spark's documentation on finding lag spikes.