Performance Tuning
Optimize your Hytale server for better performance with proper memory allocation and JVM tuning.
Memory Allocation
Section titled “Memory Allocation”Recommended RAM by Player Count
Section titled “Recommended RAM by Player Count”| Players | Recommended RAM |
|---|---|
| 1-10 | 4GB |
| 10-20 | 6GB |
| 20-50 | 8GB |
| 50+ | 12GB+ |
Setting Memory Limits
Section titled “Setting Memory Limits”java -Xms4G -Xmx4G -jar HytaleServer.jar --assets ../HytaleAssets| Flag | Description |
|---|---|
-Xms | Initial heap size (minimum memory) |
-Xmx | Maximum heap size (memory cap) |
Example Configurations
Section titled “Example Configurations”Small Server (1-10 players):
java -Xms4G -Xmx4G -jar HytaleServer.jar --assets ../HytaleAssetsMedium Server (20-50 players):
java -Xms8G -Xmx8G -jar HytaleServer.jar --assets ../HytaleAssetsLarge Server (50+ players):
java -Xms12G -Xmx12G -jar HytaleServer.jar --assets ../HytaleAssetsJVM Garbage Collection
Section titled “JVM Garbage Collection”G1GC (Recommended)
Section titled “G1GC (Recommended)”For better garbage collection performance, use G1GC:
java -Xms4G -Xmx4G \ -XX:+UseG1GC \ -XX:+ParallelRefProcEnabled \ -XX:MaxGCPauseMillis=200 \ -jar HytaleServer.jar --assets ../HytaleAssets| Flag | Description |
|---|---|
-XX:+UseG1GC | Enable G1 Garbage Collector |
-XX:+ParallelRefProcEnabled | Parallel reference processing |
-XX:MaxGCPauseMillis=200 | Target max GC pause time |
Advanced G1GC Tuning
Section titled “Advanced G1GC Tuning”For high-performance servers:
java -Xms8G -Xmx8G \ -XX:+UseG1GC \ -XX:+ParallelRefProcEnabled \ -XX:MaxGCPauseMillis=200 \ -XX:+UnlockExperimentalVMOptions \ -XX:+DisableExplicitGC \ -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 HytaleServer.jar --assets ../HytaleAssetsView Distance
Section titled “View Distance”Adjust maximum view radius in config.json to balance performance:
{ "MaxViewRadius": 32}| View Radius | Performance Impact | Visual Range |
|---|---|---|
| 16 | Low | ~256 blocks |
| 24 | Medium | ~384 blocks |
| 32 | High (default) | ~512 blocks |
| 48 | Very High | ~768 blocks |
Tick Rate
Section titled “Tick Rate”The server runs at 30 TPS (ticks per second) by default. Monitor tick times to identify performance issues:
- Good: <33ms per tick (30+ TPS)
- Acceptable: 33-50ms per tick (20-30 TPS)
- Poor: >50ms per tick (<20 TPS)
Performance Monitoring
Section titled “Performance Monitoring”Key Metrics to Watch
Section titled “Key Metrics to Watch”- TPS (Ticks Per Second) - Should stay at 30
- Memory Usage - Should stay below 80% of max
- Chunk Load Time - Affects player experience
- Entity Count - High counts cause lag
Reducing Server Load
Section titled “Reducing Server Load”- Limit entity spawning - Reduce mob caps
- Reduce view distance - Lower
MaxViewRadius - Disable unused worlds - Less memory overhead
- Optimize plugins - Profile and fix slow plugins
- Use SSDs - Faster chunk loading/saving
Hardware Recommendations
Section titled “Hardware Recommendations”- Modern multi-core processor (4+ cores)
- High single-thread performance preferred
- Intel i7/i9 or AMD Ryzen 7/9 recommended
- Minimum: 8GB system RAM (4GB for server)
- Recommended: 16GB+ system RAM
- Fast DDR4/DDR5 memory
Storage
Section titled “Storage”- SSD strongly recommended
- NVMe preferred for large servers
- Minimum 50GB free space
Network
Section titled “Network”- Stable connection required
- 100Mbps+ recommended for public servers
- Low latency to players