Hytale Server Performance Optimization
Optimizing your Hytale server performance is crucial for providing a smooth, lag-free experience for your players. This comprehensive guide covers all aspects of server optimization from basic settings to advanced tuning.
Performance Factors Overview
Server performance depends on these key factors:
- CPU processing power and core allocation
- RAM usage and garbage collection efficiency
- Disk I/O speed and storage type
- Network bandwidth and latency
- World size and player activity
CPU Optimization
Thread management and processing efficiency
Memory Management
RAM allocation and garbage collection tuning
Network Performance
Bandwidth optimization and latency reduction
Solution 1: Hardware Optimization
CPU Configuration
Optimize CPU usage for server workloads:
# Java CPU affinity and threading
-XX:+UseNUMA
-XX:+UseParallelGC
-XX:ParallelGCThreads=4
-XX:ConcGCThreads=2
-XX:+UnlockExperimentalVMOptions
-XX:+UseTransparentHugePages
Resource Allocation Guidelines
| Server Size | CPU Requirements | RAM Allocation | Storage Type |
|---|---|---|---|
| Small (1-10 players) | 2 cores @ 3.0GHz+ | 4-6GB | SATA SSD |
| Medium (10-50 players) | 4 cores @ 3.5GHz+ | 8-12GB | NVMe SSD |
| Large (50+ players) | 8+ cores @ 4.0GHz+ | 16GB+ | NVMe SSD |
Solution 2: Java Virtual Machine Tuning
Garbage Collector Selection
Choose the right GC for your server size:
# Small servers (1-20 players)
-XX:+UseSerialGC
-XX:MaxGCPauseMillis=200
# Medium servers (20-100 players)
-XX:+UseG1GC
-XX:MaxGCPauseMillis=150
-XX:G1HeapRegionSize=16M
# Large servers (100+ players)
-XX:+UseZGC
-XX:ZCollectionInterval=30
Memory Optimization
Advanced memory tuning parameters:
-Xms6G -Xmx12G
-XX:+UseCompressedOops
-XX:+UseCompressedClassPointers
-XX:+UseStringDeduplication
-XX:+OptimizeStringConcat
-XX:NewRatio=2
-XX:SurvivorRatio=8
Solution 3: Server Configuration
World Generation Settings
The setting with the most effect is MaxViewRadius in config.json: the maximum view radius in chunks (a chunk is 32 blocks wide), 32 by default and accepted from 1 to 32. A smaller radius means fewer chunks loaded and sent per player.
{
"MaxViewRadius": 12
}
Each world's own config.json also has IsSpawningNPC, IsBlockSpawnersEnabled and IsTicking, and /world settings changes them live. /world perf shows tick performance and /world tps sets the tick rate for a world.
Network Configuration
Hytale uses QUIC over one UDP port, so there are no TCP, buffer or compression settings to tune in the server file. The network setting that exists is the packet rate limit in config.json:
{
"RateLimit": {
"Enabled": true,
"PacketsPerSecond": 2000,
"BurstCapacity": 500
}
}
Those are the built-in defaults: 2,000 packets per second per client with a burst of 500. Raise them only if players on busy builds are being dropped, and leave them alone when nothing is wrong.
Solution 4: Plugin and Mod Optimization
Performance Monitoring
Track plugin performance impact:
- Use profiling tools to identify resource-heavy plugins
- Monitor plugin execution times
- Check for memory leaks in custom code
- Benchmark plugin performance with and without each mod
Plugin Optimization Best Practices
| Optimization Area | Best Practice | Performance Gain |
|---|---|---|
| Event Handling | Use efficient event listeners | 15-25% improvement |
| Database Queries | Implement connection pooling | 20-30% improvement |
| Caching | Cache frequently accessed data | 30-50% improvement |
| Async Operations | Use async for I/O operations | 40-60% improvement |
Solution 5: System-Level Optimization
Operating System Tuning
Hytale talks to players over QUIC on one UDP port, so the TCP buffer and congestion settings in generic Linux tuning guides do nothing for its game traffic. The setting that matters is the UDP receive buffer. The server (read from the server files of build 0.7.3) asks the kernel for a 33,554,432-byte (32 MiB) receive buffer on its IPv4 and IPv6 sockets, and when it gets less than 25,165,824 bytes (24 MiB), it logs this at every start:
UDP receive buffer is 425984 bytes (effective 212992), below the 25165824-byte autotune window. Raise net.core.rmem_max so inbound bursts are not dropped
Most Linux systems cap the buffer at 212,992 bytes. Raise the cap to what the server asks for, then restart the server, because it sizes the buffer when it opens its port:
# /etc/sysctl.d/99-hytale.conf, applied with: sudo sysctl --system
net.core.rmem_max = 33554432
Process Priority Management
Set appropriate priorities for server processes:
# Set high priority for server process
nice -n -10 java [server_arguments]
# CPU affinity for dedicated cores
taskset -c 0-3 java [server_arguments]
# I/O priority for better disk performance
ionice -c 1 -n 7 java [server_arguments]
Performance Monitoring
Key Metrics to Track
CPU Usage
Monitor processor utilization and thread performance
Memory Usage
Track heap usage and garbage collection frequency
Network Latency
Measure ping times and packet loss
TPS (Ticks Per Second)
Server game loop performance indicator
Disk I/O
Monitor read/write speeds and queue depth
Monitoring Tools
Use these tools for comprehensive monitoring:
- Prometheus + Grafana: Advanced metrics visualization
- Java Mission Control: JVM performance analysis
- htop/nmon: System resource monitoring
- Wireshark: Network traffic analysis
- Custom Scripts: Automated performance alerts
Troubleshooting Performance Issues
Common Performance Problems
| Symptom | Cause | Solution |
|---|---|---|
| Low TPS (<15) | CPU bottleneck or inefficient plugins | Upgrade CPU or optimize plugins |
| Frequent GC pauses | Insufficient RAM or poor GC tuning | Increase heap size or tune GC |
| High latency | Network issues or server overload | Optimize network or reduce load |
| Chunk loading delays | Slow storage or insufficient I/O | Upgrade to SSD or optimize I/O |
Performance Testing
Regular performance testing methodology:
- Establish baseline performance metrics
- Simulate typical player load patterns
- Test with stress scenarios (maximum capacity)
- Monitor resource usage during testing
- Document results and compare over time
Pro Tip: Implement automated performance testing that runs during low-traffic periods. This helps identify performance regressions before they impact players.
Advanced Optimization Techniques
Load Balancing
For very large servers, consider these strategies:
- Distribute world processing across multiple instances
- Use proxy servers for connection handling
- Implement database clustering for data storage
- Separate chat and auxiliary services
Caching Strategies
The server has no cache layer to configure. Its storage is set in config.json through PlayerStorage, UniverseResourceStorage and BanStorage providers, and world chunks use the storage type in each world's ChunkStorage setting. Change these only on advice from the server documentation.
Maintenance and Updates
Regular Optimization Tasks
- Weekly performance review and metric analysis
- Monthly JVM tuning adjustments
- Quarterly hardware assessment and upgrades
- Continuous plugin optimization and updates
- Regular system maintenance and cleanup
Maximize your Hytale server performance with proper optimization, monitoring, and maintenance to provide the best possible experience for your community.