How to Fix Minecraft Using Too Much CPU
Fix Minecraft high CPU usage on servers and clients. Covers profiling, entity optimization, tick loop analysis, and JVM settings for Java Edition 1.21+.
How to Fix Minecraft Using Too Much CPU
The Problem
CPU usage: 95-100%
Server thread consuming 80%+ of single core
[WARN] Can't keep up! Is the server overloaded?
Minecraft's main game loop runs on a single thread. When the server tick takes longer than 50ms, the main thread uses 100% of one CPU core trying to catch up. This is different from multi-threaded CPU usage, where all cores are busy. High single-core usage with low TPS means the game logic is the bottleneck. High multi-core usage usually means garbage collection or async operations (chunk loading, plugin I/O) are the issue.
Quick Fix
Profile your server with Spark (/spark profiler start). After 5 minutes of peak load, stop it and examine the report. The top entries on the Server Thread show exactly what is consuming CPU time. Address the biggest offender first.
Step-by-Step Diagnosis
- Identify CPU usage type. Check if one core is at 100% (main thread bottleneck) or all cores are busy (GC or async tasks). On Linux, use
htopand look at per-core utilization. On Windows, use Task Manager's "Performance" tab. - Profile the server thread. Run
/spark profiler start. Wait 5 minutes during typical gameplay. Run/spark profiler stop. The report breaks down exactly where CPU time is spent. - Check entity ticking. If
ServerLevel.tickNonPassengerorLivingEntity.tickdominates the report, entities are the bottleneck. Reduce mob counts and enable entity activation range settings. - Check plugin load. Plugin event handlers that run synchronously on the main thread add to tick time. Spark's report shows plugin methods by name and percentage.
- Check chunk generation. New chunk generation is CPU-intensive. If players are exploring, pre-generate the world with Chunky.
- Check GC overhead. Run
/spark gc. If GC takes more than 10% of total time, tune your JVM flags or adjust heap size. - Review redstone and hoppers. Complex redstone machines and large hopper networks consume significant tick time. Enable
hopper.disable-move-event: trueandredstone-implementation: alternate-currentin Paper config.
Common Causes
- Entity overload. The most common cause. Each entity is ticked every server tick. A single mob farm with 200 mobs can use 30% of tick time.
- Synchronous plugin operations. Plugins that query databases, read files, or make HTTP requests on the main thread block the tick loop.
- Chunk generation. Generating terrain is one of the most CPU-intensive operations in Minecraft.
- Vanilla hopper logic. Each hopper checks for items to pull every tick. Large hopper systems (item sorters) are extremely expensive.
- Villager AI. Villagers have the most complex AI in vanilla Minecraft. Large villager trading halls cause noticeable CPU usage.
Client-Side CPU Usage
If your Minecraft client uses too much CPU:
- Cap your frame rate. Unlimited FPS makes the CPU render as fast as possible. Set it to your monitor's refresh rate (usually 60 or 144).
- Reduce render distance. Each additional chunk requires CPU time for culling and rendering calculations.
- Install Sodium (Fabric) or OptiFine (Forge) for optimized rendering that reduces CPU overhead.
- Disable unnecessary visual effects: particles, clouds, entity shadows.
FAQ
Does Minecraft use all CPU cores?
The main game tick is single-threaded. Paper offloads some work (chunk loading, async plugin tasks, GC) to other threads. Folia distributes tick processing across multiple threads by region. Standard Minecraft depends primarily on single-core performance.
Will upgrading my CPU fix the lag?
Only if the bottleneck is actually CPU speed. If your server runs at 20 TPS with 60% CPU usage, a faster CPU will not help. Profile first to confirm the CPU is the bottleneck.
Is 100% CPU usage always bad?
On the server, 100% of one core with TPS below 20 means the server cannot keep up. On the client, 100% CPU with high FPS is normal and expected, the game is rendering as fast as possible.
Need a server that handles all this? Astroworld Hosting, NVMe SSDs, Pterodactyl panel, DDoS protection on every plan.