CPU Package C-State Control
By disabling deep C-states (C6/C6p), you prevent CPUs from falling into deep sleep, eliminating the wake-up delays that lead to packet drops. The CPU can still use light idle states like C 0 or C1 , meaning cores stay low-power when idle but wake up instantly to handle incoming traffic.
Some methods to check and control C-state entry within your OS are:
Check:
cpupower monitor or cpupower idle-infoDisable only C6/C6p States:
cpupower idle-set -d3
cpupower idle-set -d4OR
Disable All C-States:
cpupower idle-set -D0 Our modern Intel Xeon platforms (including Xeon 6 and 4th/5th Gen Xeon Scalable Processors), C-state behavior heavily impacts packet latency. - Disabling C6/C6p: It removes deep-sleep exit delays that cause packet drops during sudden traffic bursts, while still allowing light idle states (C1/C1E) to maintain thermal efficiency .
- Disable All C-states recommended for polling workloads(such as AF_XDP). It prevents cores from entering any low-power state, keeping them permanently in C0 for zero wake-up latency at the cost f higher power consumption. When Hyper Threading is enabled or disabled, disabling idle states prevents cores from entering low-power states during idle periods and reduces the latency for the CPU to transition between idle and active states.
- To prevent cores from dropping into low-power states during traffic, reduce the active queue count using "ethtool -L <ethX> combined <num_queues>"
Requirement:
This requires a strict 1:1 mapping between each network queue and a dedicated CPU cores to ensure network traffic continuously keeps assigned cores active and avoids latency spikes from power-state transitions
Enable C6/C6p:
cpupower idle-set -e3
cpupower idle-set -e4Enable All C-States:
cpupower idle-set -E- Another method is to utilize the tuned tool (included with many Linux distributions) to set a performance profile. These profiles modify several OS settings that can affect performance across many applications. It has been found that the network-throughput profile provides improvement to most workloads.
Check:
tuned-adm activeSet:
tuned-adm profile network-throughput tuned service must be running for above commands. To check/restart tuned: systemctl status tuned systemctl restart tuned