Quick Wins
Before diving deep, here are the most impactful optimizations:
- Use Paper or Purpur instead of Vanilla or Spigot
- Use optimized startup flags (see our Flags Generator)
- Pre-generate your world to avoid lag spikes
- Limit view distance to 6-8 chunks for survival servers
Step 1: Choose the Right Server Software
Your choice of server software has the biggest impact on performance.
| Software | Performance | Best For |
|---|---|---|
| Paper | Excellent | Most servers |
| Purpur | Excellent | Custom features |
| Spigot | Good | Legacy compatibility |
| Vanilla | Baseline | Pure experience |
Paper includes dozens of performance optimizations over Spigot, including async chunk loading, optimized entity tracking, and better memory management.
Step 2: Optimize Startup Flags
Java startup flags significantly impact performance. Use our generator or copy these recommended flags:
Tip
Use our Startup Flags Generator to create customized flags for your server.
Key points:
- Allocate appropriate RAM (4-8GB for most servers)
- Use G1GC garbage collector
- Set identical -Xms and -Xmx values
- Enable string deduplication on Java 11+
Step 3: Configure server.properties
Edit server.properties for optimal settings:
# Reduce view distance for better performance
view-distance=6
simulation-distance=4
# Disable unnecessary features
spawn-monsters=true
spawn-animals=true
spawn-npcs=true
# Network optimization
network-compression-threshold=256
View Distance vs Simulation Distance
- view-distance: How far players can see (chunks sent to client)
- simulation-distance: How far entities are ticked (server performance impact)
Keep simulation-distance lower than view-distance for the best balance.
For more tuning tips, see Best View Distance and Simulation Distance.
Step 4: Paper Configuration
Paper offers extensive configuration options. Key files to edit:
paper-global.yml
chunk-system:
gen-parallelism: default
io-threads: -1
worker-threads: -1
async-chunks:
threads: -1
paper-world-defaults.yml
entities:
armor-stands:
tick: false
spawning:
despawn-ranges:
ambient:
hard: 72
soft: 28
axolotls:
hard: 72
soft: 28
environment:
optimize-explosions: true
disable-teleportation-suffocation-check: true
hopper:
disable-move-event: false
ignore-occluding-blocks: false
chunks:
auto-save-interval: 6000
delay-chunk-unloads-by: 10s
Step 5: Pre-Generate Your World
Chunk generation is expensive. Pre-generate your world to avoid lag when players explore:
Using Chunky Plugin
- Install Chunky
- Set your world border:
/worldborder set 10000 - Start pre-generation:
/chunky radius 5000 - Begin:
/chunky start
Info
Pre-generation can take hours for large worlds. Run it when players are offline.
Step 6: Entity Optimization
Entities are often the biggest performance drain.
Reduce Entity Counts
- Use mob stacking plugins for farms
- Limit breeding and spawning rates
- Clear excess dropped items regularly
Common Lag Sources
| Entity | Impact | Solution |
|---|---|---|
| Villagers | Very High | Limit to 10-20 per area |
| Item frames | High | Avoid in bulk |
| Armor stands | Medium | Disable ticking |
| Dropped items | Medium | Use ClearLag |
Step 7: Plugin Optimization
Plugins add functionality but can hurt performance.
Best Practices
- Audit regularly - Remove unused plugins
- Use Timings - Run
/timings reportto identify slow plugins - Choose quality - Use well-maintained plugins from reputable sources
- Limit async tasks - Too many async operations cause thread contention
Performance-Heavy Plugin Categories
- Dynmap - Uses significant CPU for rendering
- World edit - Large operations cause lag
- Economy plugins - Database operations can be slow
- Hologram plugins - Many entities = many ticks
Step 8: Database Optimization
If using MySQL or MariaDB:
-- Add indexes to frequently queried tables
-- Ensure proper connection pooling
-- Use async database operations
Consider SQLite for smaller servers - less overhead, no network latency.
Step 9: Monitoring Performance
Using Spark
Spark is the best profiling tool for Minecraft:
- Install Spark plugin
- Run
/spark profiler - Wait 1-2 minutes during normal gameplay
- Run
/spark profiler --stop - Analyze the report
Key Metrics
- TPS - Should be 20.0 (use
/spark tps) - MSPT - Milliseconds per tick, should be under 50
- Memory - Watch for memory leaks
Step 10: Hardware Considerations
CPU Priority
Minecraft is single-threaded for game ticks. Prioritize:
- Single-core performance over core count
- High clock speed (4+ GHz)
- Modern architecture (Ryzen 5000+, Intel 12th gen+)
RAM Guidelines
| Server Size | Recommended RAM |
|---|---|
| 1-10 players | 2-4 GB |
| 10-30 players | 4-6 GB |
| 30-50 players | 6-8 GB |
| 50-100 players | 8-12 GB |
| 100+ players | 12+ GB |
Storage
Use SSDs for world data. NVMe preferred for large worlds.
Common Performance Issues
Lag Spikes Every 30 Seconds?
This is often auto-save. Increase auto-save-interval in Paper config or use a backup plugin instead.
TPS Drops During Exploration?
Pre-generate your world and consider a world border to limit exploration area.
Memory Keeps Growing?
Could be a memory leak. Use Spark to profile memory usage and identify the culprit.
Conclusion
Server optimization is an ongoing process. Start with the biggest wins (Paper, flags, view distance), monitor with Spark, and iterate. Every server is different - what works for one may not work for another.