Reduce Minecraft lag with spark and plugins
Measure lag with spark, then use Chunky and ClearLaggEnhanced from the Plugins tab, with the console commands and settings this guide covers.
Lag on a Minecraft server shows up as TPS, ticks per second, falling below 20, which means the server is taking too long to finish each tick. Guessing wastes time, so this guide measures first with spark, then uses two plugins: Chunky, which builds terrain ahead of your players, and ClearLaggEnhanced, which removes and limits entities. It assumes a Paper server, because Paper, Purpur and (where switched on) Folia show a Plugins tab.
Checked against spark 1.10.192 (Bukkit jar), Chunky 1.5.3 and ClearLaggEnhanced 26.10.1 on Paper 26.3, October 2026.
Read your TPS first
Open the Console tab and look at the Ticks per second card. It shows the reading against a target of 20. Each tick has 50 milliseconds to finish, so a server holding 20 TPS is keeping up. Type spark tps into the Send a command box for the same figure plus MSPT, the milliseconds each tick takes. In the console, type commands without the leading slash. In game, use the slash.
If TPS stays near 20 and only one player complains, the cause is more likely that player's connection than the server. See Why is my server lagging? Find the cause. If TPS drops, carry on.
Find the cause with spark
spark is already built into Paper 1.21 and newer, so there is nothing to install. Type spark in the console to check. If the server does not know the command, download the Bukkit jar from spark's download page, open the File Manager, open the plugins folder, click Upload (its tooltip reads Upload files), pick the jar, then restart from the Console tab.
- Run
spark profiler start --timeout 120. The profiler samples the server for 120 seconds, then stops by itself. - Let players do whatever causes the lag while it runs.
- When it finishes, spark uploads the profile and prints a link in the console. Open the link in a browser.
- In the viewer, open the Server thread, the main thread that runs the game, and follow the branches with the biggest percentages. To see the time per plugin, switch to the viewer's sources view. The next two sections cover Chunky and ClearLaggEnhanced.
spark averages its samples, which can hide a spike that lasts only a tick or two. If the lag comes in short spikes, run spark tickmonitor --threshold-tick 50 to report every tick over 50 milliseconds, then spark profiler start --only-ticks-over 100 so the profile only records the slow ticks. Stop it with spark profiler stop.
Profile again after each change. A fix you cannot measure is a guess.
Build terrain ahead with Chunky
Chunky builds terrain ahead of time, so the server has less to generate while players explore. Pre-generate a Minecraft world with Chunky covers the commands.
Clear and limit entities with ClearLaggEnhanced
If the profile points at entities instead, reduce how many are loaded at once. ClearLagg, the plugin older guides name for it, was built to reduce lag by removing entities and limiting them, but its maintained page is on SpigotMC, which the Plugins tab cannot search. ClearLaggEnhanced is a maintained continuation, credited to the original ClearLagg developer, and it is on Modrinth.
- Open Plugins under Content in the left rail.
- Leave the Modrinth source chip selected, search for
ClearLaggEnhancedand click Install. - Restart from the Console tab. Plugins load only at startup.
- Type
lagg helpin the console to list the commands.
The commands you will use most:
The entity clearing module runs on its own. By default it clears every 5 minutes, and it protects villagers, item frames and display entities. The interval is the interval: 300 line in the module's config.yml, found at module/entity-clearing/config.yml inside the plugins/ClearLaggEnhanced folder. Edit it in the File Manager, click Save, then run lagg reload.
In game, an operator can run /lagg admin to open a menu of every module. Left-click a module to configure it, right-click to switch it on or off.
Clearing removes entities from the world. Run lagg clear once while few players are on, check nothing you care about disappeared, and only then leave the automatic schedule running. Use one entity clearer at a time, so you can tell which one removed something.
Where to go next
Was this guide helpful?
Related guides
Pre-generate a Minecraft world with Chunky
Install Chunky from the Plugins tab, pick a radius and run a pre-generation from the console, plus the settings that stop it stalling.
Profile a modded Minecraft server with spark
Install spark from the Mods tab, run a profile from the Console, find short lag spikes and read the report to see which mod is using the time.
Minecraft TPS and the types of lag explained
What TPS and MSPT mean, how server, network and client lag differ, how to read the Ticks per second card and which commands show TPS.
