• Stars
    star
    1,027
  • Rank 44,839 (Top 0.9 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created over 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A performance profiler for Minecraft clients, servers, and proxies.

spark

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

Useful Links

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.

More Repositories

1

helper

A collection of utilities and extended APIs to support the rapid and easy development of Bukkit plugins.
Java
456
star
2

paste

paste is a simple web app for writing & sharing code.
TypeScript
221
star
3

BungeeGuard

A plugin-based security/firewall solution for BungeeCord and Velocity proxies.
Java
211
star
4

commodore

Utility for using Minecraft's 1.13 'brigadier' library in Bukkit plugins.
Java
177
star
5

bytebin

Fast & lightweight content storage web service.
Java
102
star
6

jar-relocator

A Java program to relocate classes within a jar archive using ASM.
Java
90
star
7

spark-viewer

Web frontend for spark.
TypeScript
77
star
8

fabric-permissions-api

A simple permissions API for Fabric
Java
52
star
9

minecraft-command-permissions-fabric

Registers vanilla Minecraft commands in Fabric Permission API with structure "minecraft.command.<command>"
Java
45
star
10

shadow

An annotation based API for Java reflection.
Java
26
star
11

bytesocks

Fast & lightweight WebSocket server with channels.
Java
21
star
12

infra

Config for the self-hosted infrastructure and services used by my open source projects
Roff
19
star
13

VaultChatFormatter

Java
16
star
14

shadow-bukkit

Extra annotations for use with shadow and Bukkit
Java
13
star
15

ScriptController

Extended API for Java's Scripting Engine framework
Java
12
star
16

gChat

A simple global chat plugin for BungeeCord.
Java
11
star
17

TinyVault

A minimal Vault plugin
Java
11
star
18

tapir

Java
10
star
19

commodore-file

The commodore file format
Java
7
star
20

LuckPermsUI

Desktop client for LuckPerms.
Java
7
star
21

paste-netcat

Upload content to pastes.dev using netcat
Go
6
star
22

synapse

Java
5
star
23

spark2json

Convert raw spark profiler data to JSON
JavaScript
5
star
24

bytesocks-java-client

A Java client for bytesocks
Java
5
star
25

spark-docs

Documentation for spark.
TypeScript
5
star
26

configurate-toml

Java
5
star
27

spark-mappings

Deobfuscation mappings data for spark-web
JavaScript
4
star
28

ConditionalPerms

Define permissions that only apply when conditions are met
Java
4
star
29

FindLag

Java
3
star
30

adventure-platform

Java
3
star
31

adventure

Java
3
star
32

SidebarManager

A simple scoreboard manager
Java
2
star
33

LogUploader

Java
2
star
34

NetworkAnalytics

Java
2
star
35

PunishmentGui

GUI based punishments with automatically scaled responses
Java
2
star
36

lucko.github.io

Personal website
JavaScript
2
star
37

servercmd

Adds /server on the backend server
Java
1
star
38

helper-dev

Misc utilities to aid with Minecraft in-game content design
Java
1
star
39

WelcomeTutorial

Java
1
star
40

synapse-plugins

Java
1
star
41

CommandBlocker

Java
1
star
42

mod-publish

Some handy scripts to automatically publish of some of my Minecraft mods to CurseForge and Modrinth
TypeScript
1
star
43

spark-infopoints

spark info points are extra snippets of information about well-known/notable call frames
JavaScript
1
star