10 Tips to Optimize Your Minecraft Server Performance
Is your Minecraft server lagging? Low TPS causing rubber-banding and frustration for your players? From switching server software to tweaking JVM flags and optimizing world generation, here are 10 proven tips to make your server run smoother.
Understanding Server Performance: What is TPS?
Before diving into optimizations, you need to understand TPS (Ticks Per Second). Minecraft servers process game logic in "ticks" — 20 ticks per second is the target. When TPS drops below 20, the game slows down. At 15 TPS, you'll notice slight lag. Below 10 TPS, the server becomes nearly unplayable with severe rubber-banding, delayed block breaks, and mob AI freezing.
You can check your server's TPS in-game using /tps (on Paper/Spigot) or by installing the Spark plugin for detailed profiling. Understanding what's causing TPS drops is the first step to fixing them.
The 10 Optimization Tips
1. Use Paper or Purpur Instead of Vanilla
The vanilla Minecraft server software (server.jar from Mojang) is not optimized for multiplayer. It works, but it's the slowest option. Paper is a fork of Spigot that includes dozens of performance patches, async chunk loading, and optimized entity processing.
Switching from Vanilla to Paper alone can improve TPS by 30-50% with zero effort. Paper is fully compatible with vanilla clients — your players don't need to install anything. For even more performance, try Purpur, which builds on Paper with additional optimizations and configuration options.
On Azion Cloud, you can switch server software with one click through the Pterodactyl panel — no file management needed.
2. Optimize JVM Startup Flags
The Java Virtual Machine (JVM) flags control how Java manages memory and garbage collection. Using the wrong flags causes frequent GC pauses — those random lag spikes that last 200-500ms.
Use Aikar's recommended JVM flags, which are the community standard for Minecraft servers:
java -Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions
-XX:+DisableExplicitGC -XX:+AlwaysPreTouch
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40
-XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20
-XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4
-XX:InitiatingHeapOccupancyPercent=15
-XX:G1MixedGCLiveThresholdPercent=90
-XX:G1RSetUpdatingPauseTimePercent=5
-XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem
-XX:MaxTenuringThreshold=1 -jar server.jar --nogui
Key points: Always set -Xms equal to -Xmx (starting heap = max heap). Use G1GC garbage collector. Don't allocate more RAM than you need — excess RAM actually makes GC pauses worse.
3. Pre-generate Your World
Generating new chunks in real-time is one of the most CPU-intensive operations for a Minecraft server. When a player explores into unloaded territory, the server has to generate terrain, caves, structures, and biomes on the fly — causing significant TPS drops.
The solution: pre-generate your world before players join. Use the Chunky plugin:
/chunky radius 5000
/chunky start
This pre-generates a 5000-block radius around spawn. Let it run overnight — once complete, players exploring within that area won't cause any chunk generation lag. Combine this with a world border (tip #4) to prevent generation beyond the pre-generated area.
4. Set a World Border
An infinite world means infinite chunk generation, which means ever-increasing storage usage and potential lag when players explore far from spawn. Set a reasonable world border:
/worldborder center 0 0
/worldborder set 10000
This creates a 10,000-block diameter play area. For most servers, this is more than enough. A 10,000-block world at full generation is about 2-4 GB — manageable and backup-friendly. Without a border, worlds can grow to 50+ GB, making backups slow and costly.
5. Reduce View and Simulation Distance
These two settings in server.properties have the biggest impact on performance after server software choice:
- view-distance: How many chunks are sent to players. Default is 10. Reduce to 6-8 for significant improvement.
- simulation-distance: How many chunks around each player are actively ticked (mob AI, crop growth, redstone). Reduce to 4-6.
The impact is dramatic: reducing view-distance from 10 to 7 means 51% fewer chunks loaded per player. With 20 players online, that's thousands fewer chunks your CPU has to process every tick.
If you're using Paper, you can also set no-tick-view-distance in paper-world-defaults.yml — this lets players see far (10+ chunks) while only simulating nearby chunks (4-6). Best of both worlds.
6. Optimize Entity Processing
Entities (mobs, items, armor stands, minecarts) are often the #1 cause of TPS loss. Each entity requires AI calculations, pathfinding, and physics updates every tick. In Paper's configuration files, you can tune:
- Entity activation ranges — Mobs far from players skip AI processing
- Mob spawn limits — Reduce
spawn-limitsinbukkit.yml(monsters: 50, animals: 8, water-animals: 3) - Item merge distance — Dropped items within 3.5 blocks merge into one, reducing entity count
- Despawn ranges — Mobs far from players despawn faster, freeing resources
- Entity per-chunk limits — Prevent excessive mob farms from tanking TPS
A single poorly-designed mob farm can spawn 500+ entities and crash your TPS from 20 to 5. Set hard limits to protect your server.
7. Use Spark for Profiling
Spark is the essential diagnostic tool for Minecraft servers. Instead of guessing what's causing lag, Spark shows you exactly which plugins, operations, or world regions are consuming CPU time.
Install Spark as a plugin, then run:
/spark profiler start
# Wait 2-3 minutes during normal gameplay
/spark profiler stop
Spark generates a detailed report showing CPU usage breakdown by method. You'll see exactly whether it's chunk generation, entity AI, a specific plugin, or redstone causing your lag. Fix the actual problem instead of applying random optimizations.
8. Clean Up Unused Plugins
Every plugin adds overhead — even if it seems lightweight. Common culprits for performance issues:
- Dynmap/BlueMap — Map rendering is extremely CPU-intensive. Schedule renders during off-peak hours.
- Anti-cheat plugins — Some check every player action every tick. Use efficient ones like Grim.
- Logging plugins — CoreProtect and similar tools that log every block change can slow down I/O.
- Chat plugins with formatting — Plugins that process every chat message with regex patterns.
Audit your plugin list quarterly. If you have 30+ plugins and TPS issues, start by removing ones you don't actively use.
9. Schedule Regular Restarts
Java-based applications accumulate memory fragmentation over time. Even with perfect GC tuning, a server running for 48+ hours will perform worse than a freshly started one. Schedule automatic restarts every 12-24 hours during low-player periods (typically 3-5 AM).
On Pterodactyl panel, you can set this up under Schedules. Create a task that sends a warning message, waits 5 minutes, then restarts the server. Players will barely notice if you schedule it during off-peak hours.
10. Optimize Your server.properties and Paper Config
Beyond view distance, several other settings in server.properties affect performance:
network-compression-threshold=256— Compress packets larger than 256 bytes (reduces bandwidth)max-tick-time=-1— Prevents the server from force-crashing on lag spikesenable-command-block=false— Disable if you don't use command blocks (they tick every game tick)
In Paper's configuration, enable:
- Async chunk loading — Loads chunks on separate threads (enabled by default in Paper)
- Anti-Xray — Use engine-mode 2 for the best balance of protection vs. performance
- Prevent moving into unloaded chunks — Stops players from outrunning chunk loading
Quick Reference: Performance Priority Order
- Switch to Paper/Purpur (biggest single improvement)
- Set proper JVM flags (eliminates GC lag spikes)
- Pre-generate world + set world border (eliminates chunk gen lag)
- Reduce view/simulation distance (reduces per-player load)
- Tune entity settings (prevents mob-related TPS drops)
- Profile with Spark (find and fix specific issues)
- Clean up plugins (reduce overhead)
- Schedule restarts (prevent memory degradation)
Still Experiencing Issues?
Sometimes lag isn't about software optimization — it's about hardware limitations. If you've applied all these tips and still have low TPS, you may need to upgrade your server plan. Check out our Minecraft hosting plans with Intel Xeon Platinum processors and NVMe SSDs, or contact our support team for personalized optimization help.