Loading…
Loading documentation...
Eliminate game server packet loss and tick lag using Linux UDP socket sysctls, clean SteamCMD automation, systemd FiveM units, and PaperMC ZGC/Aikar flags.
Commands checked on 2026-11-23 with Linux 6.8+, Java 21, PaperMC 1.21, FiveM txAdmin, SteamCMD.
A low-jitter Linux dedicated game host tuned to handle burst UDP packet loads without silent socket drops, clean unprivileged SteamCMD update scripts for Rust/Palworld, supervised systemd FiveM/txAdmin startup, and optimal Java 21 Generational ZGC or Aikar G1GC flags for smooth 20 TPS Minecraft servers.
25565/tcp+udp, 30120/tcp+udp, 8211/udp, 28015/udp) must be opened explicitly in Network Builder / Public Access.High-tick multiplayer games burst thousands of small UDP datagrams per second. Default Linux rmem_max (~212 KB) drops UDP packets silently during player explosions, chunk syncs, or map loads. Apply /etc/sysctl.d/99-gameserver.conf:
sudo tee /etc/sysctl.d/99-gameserver.conf >/dev/null <<'EOF'
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.rmem_default = 33554432
net.core.wmem_default = 33554432
net.core.netdev_max_backlog = 100000
vm.swappiness = 10
fs.file-max = 2097152
EOF
sudo sysctl --system
Monitor real UDP buffer drops cleanly before and after tuning with nstat -az UdpInErrors UdpRcvbufErrors or netstat -su.
Never mix Aikar's G1GC flags with ZGC flags, and always set -Xms equal to -Xmx while leaving at least 1.5–2 GB RAM headroom for the Linux OS and JVM off-heap buffers (metaspace, Netty direct buffers):
For Java 21+ large heaps (>= 12 GB), Generational ZGC keeps GC pause times sub-millisecond:
java -Xms12G -Xmx12G \
-XX:+UseZGC -XX:+ZGenerational \
-XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem \
-jar paper.jar --nogui
For smaller/medium heaps (4 GB–10 GB), Aikar's tuned G1GC flags remain predictable:
java -Xms6G -Xmx6G \
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
-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 paper.jar --nogui
Never install or run SteamCMD games as root. Use a dedicated steam service account with LimitNOFILE=65535:
sudo useradd -m -r -s /bin/bash steam || true
sudo -u steam mkdir -p /home/steam/steamcmd /home/steam/games/palworld
cat <<'EOF' | sudo -u steam tee /home/steam/update-palworld.sh >/dev/null
#!/usr/bin/env bash
set -euo pipefail
/home/steam/steamcmd/steamcmd.sh \
+force_install_dir /home/steam/games/palworld \
+login anonymous \
+app_update 2394010 validate \
+quit
EOF
sudo -u steam chmod +x /home/steam/update-palworld.sh
# /etc/systemd/system/fivem.service
[Unit]
Description=FiveM Dedicated Server with txAdmin
After=network-online.target
[Service]
Type=simple
User=steam
WorkingDirectory=/home/steam/fivem/server-data
ExecStart=/home/steam/fivem/alpine/opt/cfx-server/ld-musl-x86_64.so.1 --library-path /home/steam/fivem/alpine/usr/lib/:/home/steam/fivem/alpine/lib/ -- /home/steam/fivem/alpine/opt/cfx-server/FXServer +set citizen_dir /home/steam/fivem/alpine/opt/cfx-server/citizen/ +exec server.cfg
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Confirm applied socket buffers, running process limits, and zero UdpRcvbufErrors increments while players connect:
sysctl net.core.rmem_max net.core.wmem_max net.core.netdev_max_backlog
nstat -az UdpRcvbufErrors
ss -ulnp | grep -E ':(25565|30120|8211|28015)\b'
127.0.0.1 instead of 0.0.0.0.8 GB RAM assigned and -Xmx8G. Native JVM overhead, thread stacks, and Netty buffers consume ~1–1.5 GB above -Xmx. On an 8 GB host or container, set -Xmx6G to leave safe headroom.Missing 32-bit libraries or Disk write failure. Install lib32gcc-s1 (apt-get install -y lib32gcc-s1) on Debian/Ubuntu x86_64 and verify df -h has at least 20% headroom for temp staging chunks.txAdmin / RCON ports restricted to operator allowlist IPs or private VPN access rather than leaving RCON open globally./spark profiler) on PaperMC or resmon on FiveM to isolate lagging plugins/scripts before upgrading vCPU counts.Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.