Server optimization tips
Performance is not just about throwing more hardware at the problem. Often, a few configuration tweaks yield bigger improvements than an expensive upgrade.
JVM optimization (Java servers)
Minecraft and other Java-based servers benefit enormously from proper JVM tuning.
Recommended flags for Paper 1.18+:
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5
These optimize garbage collection and reduce stutter during peak hours.
Operating system tweaks
File descriptor limits
Game servers open thousands of files and sockets. Increase the limit in /etc/security/limits.conf:
* soft nofile 65536
* hard nofile 65536
Swappiness
Linux tends to swap memory aggressively. For game servers, this causes stutter:
echo 10 > /proc/sys/vm/swappiness
Add to /etc/sysctl.conf to persist across reboots.
Game-specific tuning
Minecraft
- Reduce
view-distanceandsimulation-distanceinserver.properties - Use Paper or Purpur instead of Spigot or Vanilla
- Pre-generate the world with Chunky to eliminate chunk-load lag
- Limit entity counts per chunk with plugins like FarmControl
FiveM
- Split heavy resources across multiple folders for parallel loading
- Use
awaitin Lua instead of blocking loops - Cache database queries — never query inside
onTickhandlers - Monitor
sv_mainThreadandsv_syncThreadvia the F8 profiler
Rust / Source Engine
- Set
tickraterealistically — 128 tick is overkill for most communities - Use
fps_max 0on dedicated servers to uncouple rendering from simulation - Limit
maxplayersto what your CPU can actually serve smoothly
Monitoring and alerting
You cannot optimize what you do not measure.
- Use the panel's built-in CPU/RAM/network graphs
- Set up Discord webhooks for threshold alerts (CPU > 80%, RAM > 90%)
- Review logs weekly for recurring errors or memory leaks
- Profile before and after each optimization to confirm improvement
