Minecraft

Is a datapack, lag machine, or mob spawning causing my high CPU?

In-game contraptions and content are one of the most common sources of high CPU that people overlook. Big mob farms, unoptimized redstone, and heavy datapacks can quietly eat your server's ticks — and a spark report will show you exactly which.

Usual suspects

  • Large mob farms and dense entity clusters.
  • Unoptimized redstone and hopper arrays.
  • Chunk-loaders that keep areas active even when no one is nearby.
  • Datapacks running heavy per-tick functions.

How to find and fix it

  1. Run a spark report — if entities or block entities dominate the profile, that's your answer.
  2. Use /spark to locate the offending chunk or area.
  3. Apply targeted fixes: cap mob spawns (spigot.yml), limit hoppers, and break up or redesign lag machines.
  4. For datapacks, disable the suspect pack and test — if CPU drops, that per-tick function was the culprit.

Tip: A single well-built mob farm or chunk-loader can outweigh dozens of players in CPU cost. Don't rule out in-game contraptions just because your player count is low.

Frequently asked questions

How do I know if it's entities and not a plugin? A spark report separates them — it shows whether entities/block entities or a specific plugin dominate CPU. Read the top consumers.

Can a datapack really cause lag? Yes. Datapacks that run heavy functions every tick can be significant. Disable and re-test to confirm.