---
title: "How to use Spark commands"
icon: lucide/activity
description: "How to use the Spark plugin for profiling, TPS, and health reports on a Minecraft server."
---

# How to use Spark commands

Spark is a performance analysis tool for Minecraft servers. Spark helps check TPS, profile CPU usage, dump the heap, and produce health reports.

## Basic usage

Commands can be run from:

- the **console**, without a leading `/`
- **in-game**, with a leading `/`

## Commonly used commands

| Command | Function |
| --- | --- |
| `/spark tps` | View the server's TPS |
| `/spark profiler start` | Start the profiler |
| `/spark profiler stop` | Stop the profiler and create a result |
| `/spark profiler open` | Open the latest profiler result |
| `/spark health --upload` | Create a health report and upload it |
| `/spark gc` | View the garbage collection history |
| `/spark heapdump` | Write a heap dump to disk |

## How to find the cause of lag

1. Run `/spark profiler start`.
2. Let the server run while the lag happens.
3. Run `/spark profiler stop`.
4. Open the result with `/spark profiler open`.

## Notes

- According to the official spark documentation, `/spark gc` shows garbage collection history; it is not a magic button that "frees RAM" permanently.
- The documented official command for a health report is `/spark health`, not `/spark healthreport`.

## Extra analysis examples

- `/spark profiler start --timeout 60` for a 60-second auto-stop profiler
- `/spark health --upload` to generate a shareable report

---

!!! tip "Help us out"
    If you found this tutorial useful, please leave a review on [Trustpilot](https://www.trustpilot.com/evaluate/nexuscloud.id)! Your rating helps us make more useful guides :sparkles:

**Cheers, Team NexusCloud**

---
