How to Set Up a FiveM Server: Step-by-Step Guide
Complete FiveM server setup guide on REXE VDS: installation, txAdmin configuration, port settings, and performance optimization tips for GTA V roleplay servers.
Game server performance optimization guide. CPU/RAM management, tick rate settings, network tuning, and kernel optimization.
Game server performance is a critical factor that directly affects player experience. High latency, low tick rate, and insufficient resource management can cause players to leave your server. This guide covers CPU, RAM, network, and kernel-level optimizations for your game server on REXE VDS.
By default, Linux dynamically adjusts CPU frequency. For game servers, fixed high frequency is recommended:
# Check current governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Switch to performance mode
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Make persistent
sudo apt install cpufrequtils -y
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
sudo systemctl restart cpufrequtils
Bind your game server to specific CPU cores for better performance:
# Bind server to cores 0 and 1
taskset -c 0,1 ./server_binary
# Bind a running process
taskset -cp 0,1 $(pidof server_binary)
Isolate specific cores for the game server using kernel parameters:
sudo nano /etc/default/grub
# Add to GRUB_CMDLINE_LINUX_DEFAULT:
# isolcpus=2,3 nohz_full=2,3 rcu_nocbs=2,3
sudo update-grub
sudo reboot
Minimize swap usage for game servers:
# Check current swappiness
cat /proc/sys/vm/swappiness
# Lower swappiness (default 60)
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
# Dirty page settings
echo 'vm.dirty_ratio=15' | sudo tee -a /etc/sysctl.conf
echo 'vm.dirty_background_ratio=5' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Reduce TLB misses using huge pages:
# Set huge pages (2MB pages, 2048 count = 4GB)
echo 'vm.nr_hugepages=2048' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
# Verify
cat /proc/meminfo | grep HugePages
Protect the game server process from OOM killer:
echo -17 > /proc/$(pidof server_binary)/oom_adj
Tick rate determines how many times per second the server updates the game state. Higher tick rate provides smoother gameplay but requires more CPU and bandwidth.
| Game | Default Tick Rate | Recommended |
|---|---|---|
| CS2 | 64 | 128 |
| Minecraft | 20 | 20 |
| Rust | 30 | 30 |
| FiveM | 30 | 60 |
| V Rising | 30 | 30-60 |
# CS2 with 128 tick
./cs2 -dedicated -tickrate 128
# FiveM (server.cfg)
sv_maxclients 64
set sv_enforceGameBuild 3095
sudo nano /etc/sysctl.conf
# UDP Buffer sizes
net.core.rmem_max=26214400
net.core.wmem_max=26214400
net.core.rmem_default=1048576
net.core.wmem_default=1048576
# Network queue size
net.core.netdev_max_backlog=65536
net.core.somaxconn=65535
# TCP optimization
net.ipv4.tcp_rmem=4096 87380 26214400
net.ipv4.tcp_wmem=4096 65536 26214400
net.ipv4.tcp_max_syn_backlog=65536
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_fin_timeout=15
# UDP optimization
net.ipv4.udp_rmem_min=8192
net.ipv4.udp_wmem_min=8192
# Connection tracking
net.netfilter.nf_conntrack_max=1048576
sudo sysctl -p
# Increase ring buffer size
sudo ethtool -G eth0 rx 4096 tx 4096
# Interrupt coalescing
sudo ethtool -C eth0 rx-usecs 50 tx-usecs 50
Choose the appropriate I/O scheduler for game servers:
# Check current scheduler
cat /sys/block/sda/queue/scheduler
# For NVMe, none (noop) is recommended
echo none | sudo tee /sys/block/nvme0n1/queue/scheduler
# For SSD, mq-deadline is recommended
echo mq-deadline | sudo tee /sys/block/sda/queue/scheduler
sudo nano /etc/security/limits.conf
steam soft nofile 1000000
steam hard nofile 1000000
steam soft nproc 65535
steam hard nproc 65535
# CPU and RAM usage
htop
# Disk I/O monitoring
sudo iotop -o
# Network connections
ss -tuln
# Network traffic
sudo iftop -i eth0
# Detailed process monitoring
pidstat -p $(pidof server_binary) 1
# Test server latency
ping -c 100 SERVER_IP
# Detailed path analysis with MTR
mtr --report SERVER_IP
nano ~/optimize_gameserver.sh
#!/bin/bash
echo "=== Game Server Optimization ==="
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 2>/dev/null
sudo sysctl -w vm.swappiness=10
sudo sysctl -w net.core.rmem_max=26214400
sudo sysctl -w net.core.wmem_max=26214400
sudo sysctl -w net.core.netdev_max_backlog=65536
ulimit -n 1000000
echo "Optimization complete."
chmod +x ~/optimize_gameserver.sh
Game server optimization through CPU, RAM, network, and kernel-level improvements provides significant performance gains. With regular monitoring and proper configuration, you can deliver a low-latency, smooth gaming experience. REXE VDS high-performance hardware and Path.net DDoS protection ensure optimal server performance.
Tick rate determines how many times per second the server updates the game state. Higher tick rate provides smoother gameplay but requires more CPU and bandwidth.
Performance mode keeps the CPU at maximum frequency. This can provide 10-20% performance improvement for game servers.
Lower swappiness ensures RAM uses physical memory instead of swap. Swap usage increases latency for game servers.
Yes, but adjust based on your server RAM. Larger buffers use more RAM but improve network performance.
For NVMe drives, 'none' (noop) is recommended. For SSDs, 'mq-deadline' is recommended. For HDDs, use 'bfq' scheduler.
Complete FiveM server setup guide on REXE VDS: installation, txAdmin configuration, port settings, and performance optimization tips for GTA V roleplay servers.
Complete Minecraft server setup guide on REXE VDS: Paper/Spigot installation, Java configuration, plugin management, and performance optimization for stable gameplay.
Complete CS2 dedicated server setup guide on REXE VDS: SteamCMD installation, GSLT token, server configuration, game modes, and DDoS protection with Path Panel.