Skip to main content
Troubleshooting

Fix High CPU Usage on Minecraft Servers

Diagnose and fix high CPU usage on Minecraft servers, Spark profiling, tick analysis, entity optimisation, garbage collection tuning and hardware considerations.

6 min read9 sectionsJava & Bedrock1.21

Is High CPU Usage Actually a Problem?

A Minecraft server using 80-100% of one CPU core is not inherently bad, the game loop is single-threaded, so one core running hot is expected under load. The problem is when CPU usage causes TPS drops below 20, or when the server consumes more CPU than your host allows. Understanding your minecraft server high cpu usage is the first step to deciding if it needs fixing.

Check your TPS first: /spark tps. If TPS is 20 and CPU is high, your server is working hard but keeping up. If TPS is below 18 and CPU is maxed, you have a bottleneck to fix.

Step 1: Profile with Spark

Spark is essential for diagnosing minecraft server high cpu usage. Install it and run a profiler:

/spark profiler start --thread server
# Let it run for 5-10 minutes during peak
/spark profiler stop

The flame graph shows exactly which methods consume the most CPU. Focus on the "Server Thread", this is where tick processing happens. Common CPU-heavy operations:

  • Entity AI and pathfinding: Villagers, pillagers and other mobs with complex AI.
  • Chunk generation: Creating new terrain is very CPU-intensive.
  • Plugin event handlers: Poorly optimised plugins running expensive code every tick.
  • Redstone and hoppers: Large redstone contraptions or hopper chains.
  • Garbage collection: If GC shows up prominently, it is a memory issue causing CPU pressure.

Step 2: Reduce Entity Load

Entities are the number one CPU consumer on most servers. In paper-world-defaults.yml:

  • Reduce spawn-limits for all mob types.
  • Increase tick-rates for villager behaviours (they are disproportionately expensive).
  • Enable per-player-mob-spawns: true.
  • Use entity-activation-range to skip AI for distant mobs.

Step 3: Pre-generate Your World

Chunk generation on the fly is one of the most CPU-intensive operations. Use Chunky to pre-generate terrain before players explore it:

/chunky radius 5000
/chunky start

Run this during off-hours. Once the playable area is pre-generated, new chunk generation drops to near zero during normal gameplay.

Step 4: Tune Garbage Collection

If Spark shows GC-related methods consuming CPU, your memory configuration is the issue. See our OOM guide for JVM flag tuning. Key points:

  • Set -Xms equal to -Xmx.
  • Use G1GC with Aikar's flags.
  • Do not over-allocate: giving the JVM 32 GB when it only needs 10 GB causes longer GC pauses.

Step 5: Optimise Hoppers and Redstone

In paper-world-defaults.yml:

hopper:
  disable-move-event: true
  cooldown-when-full: true
redstone-implementation: alternate-current

These two changes alone can reduce CPU usage by 10-20% on servers with large redstone and hopper setups.

Step 6: Audit Plugins

Review the Spark profiler output for plugin class names in the hot path. Disable suspected plugins one at a time and re-profile. Common offenders:

  • Anti-cheat plugins with per-tick checks
  • Hologram plugins rendering hundreds of entities
  • Scoreboard plugins updating every tick
  • Custom enchant plugins with damage event listeners

Hardware Considerations

Minecraft's main game loop is single-threaded, so clock speed matters more than core count. A 4-core CPU at 5 GHz will outperform a 16-core CPU at 3 GHz for Minecraft. If you have optimised everything software-side and still hit CPU limits, consider migrating to a host with higher single-threaded performance.

For the broader picture on lag, see our comprehensive lag fix guide.

Want to just play without the headaches? Join Astroworld MC, IP play.astroworldmc.com, Java + Bedrock.

Questions about Fix High CPU Usage on Minecraft Servers

Why would you set up Fix High CPU Usage on Minecraft Servers at all?

A Minecraft server using 80-100% of one CPU core is not inherently bad, the game loop is single-threaded, so one core running hot is expected under load.

What are the numbers behind Fix High CPU Usage on Minecraft Servers?

The problem is when CPU usage causes TPS drops below 20, or when the server consumes more CPU than your host allows.

Where does Fix High CPU Usage on Minecraft Servers store its settings?

In paper-world-defaults.yml: Reduce spawn-limits for all mob types.

What goes wrong with Fix High CPU Usage on Minecraft Servers?

Do not over-allocate: giving the JVM 32 GB when it only needs 10 GB causes longer GC pauses.

Fix High CPU Usage on Minecraft Servers: Diagnose and fix high CPU usage on Minecraft servers, Spark profiling, tick analysis, entity optimisation, garbage collection tuning and hardware considerations.
Fix High CPU Usage on Minecraft Servers, from the Troubleshooting guides on Astroworld.

Blocks and items in this guide

Redstone in MinecraftRedstoneHopper in MinecraftHopper

All 2 of these are named in the Fix High CPU Usage on Minecraft Servers guide above, starting with Redstone. Look them up in the item database.

More guides on this site

More Troubleshooting Guides

Related Tools & Databases