Server performance is crucial for player retention. Nothing drives players away faster than lag and poor performance. Here's how to optimize your server for maximum performance:
Understanding TPS (Ticks Per Second)
Minecraft servers run at 20 TPS (ticks per second) by default. Each tick represents one game update cycle. When TPS drops below 20, the server experiences lag, affecting gameplay quality.
Hardware Optimization
**Storage** - Use NVMe SSDs for faster world loading - Avoid traditional HDDs for world storage - Consider RAM disks for temporary worlds
**Memory** - 8GB minimum for 50+ players - 16GB+ for large networks - Use appropriate JVM heap sizes (50-80% of available RAM)
**CPU** - Prioritize single-core performance over core count - Minecraft is primarily single-threaded - Intel CPUs often perform better than AMD for Minecraft
**Network** - Use dedicated servers with good network connectivity - Consider CDN for resource packs and maps - Optimize network-compression-threshold
JVM Arguments
Use optimized JVM flags for better garbage collection:
-XX:+UseG1GC
-XX:+UnlockExperimentalVMOptions
-XX:MaxGCPauseMillis=100
-XX:+DisableExplicitGC
-XX:TargetSurvivorRatio=90
-XX:G1NewSizePercent=50
-XX:G1MaxNewSizePercent=80
-XX:G1MixedGCLiveThresholdPercent=35
-XX:+AlwaysPreTouch
Server Software
Choose performance-optimized server software: - **Paper**: Most popular, good balance of features and performance - **Purpur**: Based on Paper with additional optimizations - **Airplane**: Experimental high-performance fork
Configuration Optimization
**server.properties** - view-distance: 8-10 (default 10 can be too high) - simulation-distance: 8-10 - network-compression-threshold: 256 - max-tick-time: 60000
**spigot.yml** - Reduce entity spawn rates - Optimize mob spawn ranges - Enable entity activation ranges
**paper.yml** - Enable async chunk loading - Optimize redstone and hoppers - Configure anti-cheat optimizations
Plugin Management
- Use plugins like Spark to profile performance
- Remove unnecessary plugins
- Choose lightweight alternatives when possible
- Implement async operations where supported
World Management
**Pre-generation** - Use plugins like Chunky to pregenerate worlds - Reduces chunk loading lag during exploration - Set appropriate world borders
**Maintenance** - Regular world optimization with plugins like FarmLimiter - Clean up excessive entities and tile entities - Monitor world size and consider resets for resource worlds
Database Optimization
**MySQL vs SQLite** - Use MySQL for servers with 50+ players - Implement connection pooling - Regular database maintenance and optimization
Monitoring and Maintenance
**Tools** - Spark profiler for performance analysis - LagMonitor for real-time TPS monitoring - TimingsV2 for detailed performance reports
**Automated Tasks** - Set up automatic server restarts - Schedule regular world backups - Implement automated cleanup scripts
Network Optimization
- Use compression for client-server communication
- Optimize chunk sending rates
- Consider proxy servers for large networks
Player Limit Considerations
Don't exceed your server's capacity: - Monitor resource usage as player count increases - Implement queue systems for popular servers - Consider horizontal scaling with multiple servers
Testing and Validation
- Use stress testing tools
- Monitor performance during peak hours
- Gather player feedback on lag issues
- Regular performance audits
By following these optimization techniques, you can achieve consistent 20 TPS even with 100+ concurrent players. Remember that optimization is an ongoing process - regularly monitor your server's performance and adjust accordingly.