Profile Laggy Ticks Using /spark profiler

What Does /spark profiler Do?

The /spark profiler command captures detailed performance data. With the --only-ticks-over option, you can filter the profile to include only laggy ticks.

How to Use It

  1. Choose a Threshold
    Use the tick duration from Step 1 as a reference. For example, if laggy ticks exceed 150 milliseconds:

    /spark profiler --only-ticks-over 150  
    
    
  2. Run the Profiler

    • The profiler will start recording, but only for ticks exceeding the threshold.
    • Let it run long enough to capture lag events.
  3. Stop the Profiler
    Use:

    /spark profiler stop  
    
    
  4. Inspect the Results
    Open the profiling report and analyze the data. The laggy ticks will stand out, making it easier to identify the cause.

Example

In the profiler output, you might see a high percentage of time spent on a plugin, mod, or player action. This helps isolate the problem.



Revision #1
Created 4 January 2025 03:08:14 by Ridgeline Servers
Updated 4 January 2025 03:08:58 by Ridgeline Servers