CPU settings for production
Problem
CPU power-saving modes (such as Intel SpeedStep, AMD Cool'n'Quiet, C-states, and P-states) can hurt YDB performance for several reasons:
- Unstable CPU frequency — YDB expects stable CPU throughput for predictable operation.
- Core affinity issues — changing per-core frequency can break load balancing across threads.
- Mode-switching latency — transitions between power-saving states add extra delays.
- Unpredictable throughput — operations may run at different speeds depending on the current CPU mode.
Typical symptoms:
- Unstable query latency.
- Unexplained performance drops.
- Uneven load across cluster nodes.
- Erratic behavior under heavy load.
Solution
Recommended BIOS/UEFI settings
For YDB servers, configure the following BIOS/UEFI settings:
- CPU Power Management — set to Performance or Max Performance.
- Intel Turbo Boost — enable for maximum performance.
- C-states — disable or limit to C1/C1E.
- P-states — use a fixed maximum frequency.
- Intel SpeedStep / AMD Cool'n'Quiet — disable.
- Package C-State Limit — set to C0 or C1.
Operating system settings
On Linux, for deployments not using the Ansible role (which configures this automatically), run the following commands as root:
# Force the performance cpufreq governor
echo 'performance' | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null
# Pin minimum frequency to maximum
echo $(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) | \
sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq >/dev/null
# Reduce PCIe ASPM power saving
echo 'performance' | sudo tee /sys/module/pcie_aspm/parameters/policy >/dev/null
Verifying current settings
Useful checks (after applying settings, the first command should output performance for every CPU core):
# Current governor
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Available frequencies
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
# C-states
cat /sys/devices/system/cpu/cpu0/cpuidle/state*/name
Rationale
As a high-performance distributed database, YDB needs stable and predictable CPU performance. Client-style power-saving modes are a poor fit for server workloads that require sustained availability and low latency.
A stable CPU frequency helps with:
- Predictable operation latency.
- Correct behavior of load-balancing mechanisms.
- Steady throughput under load.
- Minimal delays for transaction processing.
Exceptions
Compromises may be acceptable when:
- Test environments — energy efficiency matters more than raw performance.
- Standby nodes — not serving active traffic.
- Low-load deployments — power savings are a priority.
For busy production clusters, follow the recommendations above.