A performance profiler for Minecraft clients, servers, and proxies. https://spark.lucko.me/
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-06-08 21:35:54 +01:00
.github Remove gradle workflow 2019-09-03 18:59:01 +01:00
gradle/wrapper Fix java compile configuration 2021-11-10 09:00:24 +00:00
spark-api Allow platforms to provide their own TPS/MSPT calculations 2023-03-19 19:35:29 +00:00
spark-bukkit Compile spark fabric/forge against MC 1.19.4 2023-03-15 18:39:32 +00:00
spark-bungeecord Don't use multi-release jar for websocket code 2023-03-07 21:54:14 +00:00
spark-common Handle frame splitting ourselves in LegacyBytesocksClient 2023-05-24 12:27:23 -04:00
spark-fabric Ignore empty mixin packages in FabricClassSourceLookup (#330) 2023-05-21 08:19:52 +01:00
spark-forge Compile spark fabric/forge against MC 1.19.4 2023-03-15 18:39:32 +00:00
spark-forge1710 Make sure the server plugin unregisters itself when disabled 2023-05-24 12:27:38 -04:00
spark-minestom Fix only-ticks-over rejected execution error (#324) 2023-05-11 20:41:42 +01:00
spark-nukkit Don't use multi-release jar for websocket code 2023-03-07 21:54:14 +00:00
spark-sponge7 Don't use multi-release jar for websocket code 2023-03-07 21:54:14 +00:00
spark-sponge8 Don't use multi-release jar for websocket code 2023-03-07 21:54:14 +00:00
spark-velocity Close worker thread pool on profiler stop (#305, #298, #281) 2023-03-13 11:19:25 +00:00
spark-velocity4 Close worker thread pool on profiler stop (#305, #298, #281) 2023-03-13 11:19:25 +00:00
spark-waterdog Don't use multi-release jar for websocket code 2023-03-07 21:54:14 +00:00
.gitignore Improve some proto message/field names 2021-05-06 16:34:16 +01:00
build.gradle Don't use multi-release jar for websocket code 2023-03-07 21:54:14 +00:00
gradle.properties Update to master branch 2022-06-09 16:57:41 -04:00
gradlew Update fabric version, bump Gradle wrapper version 2021-08-20 10:45:50 +01:00
gradlew.bat Update gradle wrapper 2021-05-19 13:04:08 +01:00
HEADER.txt Improve build tooling 2022-02-06 20:25:07 +00:00
jitpack.yml Implement world info provider for 1.7.10 2022-07-11 13:25:58 -04:00
LICENSE.txt Initial commit for spark 2018-05-27 00:02:02 +01:00
README.md Update readme 2022-02-18 19:10:00 +00:00
settings.gradle Merge remote-tracking branch 'lucko/master' into forge-1.7.10 2022-06-09 16:34:22 -04:00

spark

spark is a performance profiler for Minecraft clients, servers and proxies.

What does spark do?

spark is made up of three separate components:

  • CPU Profiler: Diagnose performance issues.
  • Memory Inspection: Diagnose memory issues.
  • Server Health Reporting: Keep track of overall server health.

⚡ CPU Profiler

spark's profiler can be used to diagnose performance issues: "lag", low tick rate, high CPU usage, etc.

It is:

  • Lightweight - can be ran in production with minimal impact.
  • Easy to use - no configuration or setup necessary, just install the plugin/mod.
  • Quick to produce results - running for just ~30 seconds is enough to produce useful insights into problematic areas for performance.
  • Customisable - can be tuned to target specific threads, sample at a specific interval, record only "laggy" periods, etc
  • Highly readable - simple tree structure lends itself to easy analysis and interpretation. The viewer can also apply deobfuscation mappings.

It works by sampling statistical data about the systems activity, and constructing a call graph based on this data. The call graph is then displayed in an online viewer for further analysis by the user.

There are two different profiler engines:

  • Native AsyncGetCallTrace + perf_events - uses async-profiler (only available on Linux x86_64 systems)
  • Built-in Java ThreadMXBean - an improved version of the popular WarmRoast profiler by sk89q.

⚡ Memory Inspection

spark includes a number of tools which are useful for diagnosing memory issues with a server.

  • Heap Summary - take & analyse a basic snapshot of the servers memory
    • A simple view of the JVM's heap, see memory usage and instance counts for each class
    • Not intended to be a full replacement of proper memory analysis tools. (see next item)
  • Heap Dump - take a full (HPROF) snapshot of the servers memory
    • Dumps (& optionally compresses) a full snapshot of JVM's heap.
    • This snapshot can then be inspected using conventional analysis tools.
  • GC Monitoring - monitor garbage collection activity on the server
    • Allows the user to relate GC activity to game server hangs, and easily see how long they are taking & how much memory is being free'd.
    • Observe frequency/duration of young/old generation garbage collections to inform which GC tuning flags to use

⚡ Server Health Reporting

spark can report a number of metrics summarising the servers overall health.

These metrics include:

  • TPS - ticks per second, to a more accurate degree indicated by the /tps command
  • Tick Durations - how long each tick is taking (min, max and average)
  • CPU Usage - how much of the CPU is being used by the process, and by the overall system
  • Memory Usage - how much memory is being used by the process
  • Disk Usage - how much disk space is free/being used by the system

As well as providing tick rate averages, spark can also monitor individual ticks - sending a report whenever a single tick's duration exceeds a certain threshold. This can be used to identify trends and the nature of performance issues, relative to other system or game events.

For a comparison between spark, WarmRoast, Minecraft timings and other profiles, see this page in the spark docs.

License

spark is free & open source. It is released under the terms of the GNU GPLv3 license. Please see LICENSE.txt for more information.

The spark API submodule is released under the terms of the more permissive MIT license. Please see spark-api/LICENSE.txt for more information.

spark is a fork of WarmRoast, which was also licensed using the GPLv3.