CPU Pinning
CPU pinning gives each Counter-Strike server its own CPU cores, so other processes on the node don't interfere with it. Players get more consistent tick rates and lower latency.
Configuration
On the node, add the following configuration:
kubelet-arg:
- "cpu-manager-policy=static"
- "cpu-manager-reconcile-period=5s"
- "system-reserved=cpu=1"One core is held back for the node itself. Every other core can take a server, so an 8-core node fits 7 servers at the default of 1 CPU per server, or 3 at 2.
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_stateRestart the K3s agent service:
bashsystemctl restart k3s-agent
Nodes that reserve two cores
Nodes set up before this change also reserve kube-reserved=cpu=1, so an 8-core node fits 6 servers instead of 7, and the panel warns about it on the node. To free the extra core, run this as root on the node while it has no matches:
sed -i '/kube-reserved/d' /etc/rancher/k3s/config.yaml && rm -f /var/lib/kubelet/cpu_manager_state && systemctl restart k3s-agent