Server lag is the most common complaint in Minecraft hosting. Here are 15 proven techniques to diagnose and fix TPS problems, ordered from most impactful to least.
Understanding TPS
TPS (ticks per second) is your server's heartbeat. Minecraft targets 20 TPS, meaning the game loop runs 20 times per second. Each tick has 50ms to process everything - entity AI, block updates, player actions, network packets.
When processing takes longer than 50ms, ticks get delayed and TPS drops below 20. At 18 TPS, players notice slight lag. At 15 TPS, the game feels sluggish. Below 10 TPS is unplayable.
Check TPS with: /tps or install Spark for detailed metrics.
1. Install Spark Profiler
Before changing anything, profile your server. Spark shows exactly what consumes each tick's processing time.
/spark profiler start
(wait 2-5 minutes during normal play)
/spark profiler stop
The report shows which systems (entities, chunks, plugins) consume the most time. Fix the biggest offenders first.
2. Reduce View Distance
Every chunk rendered per player costs CPU. Reducing view distance from 10 to 8 cuts loaded chunks by ~36%.
In server.properties:
view-distance=8
simulation-distance=6
simulation-distance controls how far entities and redstone are active. Setting it lower than view-distance means distant chunks are visible but dormant.
3. Optimize Entity Limits
Entities (mobs, items, XP orbs) are the most common TPS killer. In Paper's config:
# paper-world-defaults.yml
entity-per-chunk-save-limit:
experience_orb: 16
snowball: 8
ender_pearl: 8
arrow: 16
spawn-limits:
monsters: 50 # default 70
animals: 8 # default 10
water-animals: 3 # default 5
ambient: 1 # default 15
Also set entity activation ranges - entities further away tick less frequently:
entity-activation-range:
animals: 16
monsters: 24
raiders: 48
misc: 8
water: 8
4. Merge Stacked Items and XP
Paper can merge nearby items and XP orbs into single entities:
merge-radius:
item: 3.5
exp: 4.0
A mob farm that normally creates 200 XP orbs now creates far fewer (merged) entities.
5. Limit Hopper Ticking
Hoppers are surprisingly expensive. Each hopper checks for items above it every tick.
hopper:
disable-move-event: true
cooldown-when-full: true
This prevents hoppers from firing unnecessary events and reduces checks.
6. Pre-Generate Your World
See our detailed Chunky guide - pre-generating eliminates the expensive chunk creation process during gameplay.
7. Use Aikar's JVM Flags
Proper garbage collection tuning prevents GC pause spikes. Aikar's flags are the community standard for Minecraft:
Match your RAM allocation to your -Xms and -Xmx (keep them equal), and use the G1GC parameters tuned for Minecraft's allocation patterns.
8. Limit Redstone
Complex redstone circuits can consume significant tick time. Consider:
- Using pistons instead of repeater chains for timing
- Limiting redstone update frequency in config
- Asking players to use comparators efficiently
9. Audit Your Plugins
Some plugins are performance disasters. Common offenders:
- ClearLag: Ironically, its entity sweeps can cause lag spikes. Use Paper's native settings instead.
- Outdated anti-cheat plugins: Old versions check too aggressively
- Chat plugins with regex: Complex formatting can be expensive per-message
- Dynmap: Real-time rendering is CPU-intensive. Consider BlueMap or SquareMap (lighter)
Check per-plugin timing with: /spark profiler --show-plugins
10. Optimize Villager Trading
Villagers recalculate trades and path frequently. Large trading halls kill TPS.
Solutions:
- Name-tag villagers to prevent despawn checks
- Use NITWIT profession for decoration villagers
- Limit workstation access radius
- Consider a plugin that freezes villager AI when no player is nearby
11-15: Quick Wins
- Disable spawn chunks: If nobody uses spawn, disable them to save memory
- Reduce mob spawn rates at night: Fewer hostile mobs = less entity processing
- Use async chunk loading: Paper handles this natively, make sure it's enabled
- Limit TNT per tick: Prevent chain reactions from freezing the server
- Regular restarts: Schedule daily restarts to clean up memory fragmentation
When Hardware Is the Answer
If you've optimized everything above and still see TPS issues with 30+ players, your CPU is the bottleneck. Minecraft's main thread needs the fastest single-core performance available.
On Space-Node, every plan runs on AMD Ryzen 9 7950X3D - the fastest single-thread CPU for Minecraft. If you're on budget hardware with a Xeon or older Ryzen, upgrading to a hosting plan with a 7950X3D will give you measurably better TPS.
The optimization techniques above are free and should be your first approach. Hardware upgrades are for after you've squeezed everything possible from software tuning.
