CPU Pinning
CPU pinning is particularly beneficial for CS2 servers as it helps reduce latency and improve performance by dedicating specific CPU cores to the game server process. This prevents other system processes from interfering with the game server's CPU usage, leading to more consistent tick rates and lower latency for players.
Configuration
Add the following configuration to enable static CPU Manager policy:
kubelet-arg:
- "cpu-manager-policy=static"
- "cpu-manager-reconcile-period=5s"
- "system-reserved=cpu=1"
- "kube-reserved=cpu=1"
Applying Changes
After making the configuration changes, follow these steps to apply them:
Remove the existing CPU manager state:
bashrm /var/lib/kubelet/cpu_manager_state
Restart the K3s agent service:
bashsystemctl restart k3s-agent