How to Configure CPU Energy-Performance Bias in Linux Using x86_energy_perf_policy

Modern Intel and AMD processors feature hardware-level power-management registers that define the trade-off between execution throughput and electrical power draw. While standard CPU frequency governors (such as performance or powersave) adjust clock speeds via P-states, the Energy-Performance Bias (EPB) register directly controls internal CPU throttling algorithms, turbo boost aggressiveness, uncore interconnect frequencies, and autonomous power gating. In Linux systems, the kernel provides access to Model-Specific Register (MSR) 0x1B0 (IA32_ENERGY_PERF_BIAS) through the user-space utility x86_energy_perf_policy. Configuring EPB allows administrators to fine-tune low-latency workloads or maximise energy efficiency on server and workstation hardware.

Understanding Energy-Performance Bias (EPB) Architecture

The Energy-Performance Bias architecture operates on a scale from 0 (maximum raw performance) to 15 (maximum energy conservation). In modern processors supporting Intel Speed Shift (HWP – Hardware P-States), the EPB policy acts as a hint to the embedded Power Control Unit (PCU) microcontroller. The PCU uses this value to balance frequency ramp-up latency against package thermals:

  • Performance (0): Uncompromised execution speed. The PCU maintains maximum uncore ring bus speeds, aggressively scales up turbo frequencies on light-thread bursts, and delays downclocking idle logical cores.
  • Balance-Performance (4 – 6): Recommended default for enterprise compute nodes. Optimises throughput for bursty computational loads while allowing power gates to engage when threads stall on memory I/O.
  • Normal / Default (6 – 7): Factory default balance between energy efficiency and responsive computing.
  • Balance-Power (8): Favours thermal dissipation and reduced energy consumption; limits sustained turbo durations to minimise fan noise and power draw.
  • Power (15): Maximum power conservation. Disables opportunistic turbo headroom and accelerates sleep-state transitions.

Installing x86_energy_perf_policy on Linux

The x86_energy_perf_policy binary is distributed as part of the Linux kernel source tools (linux-tools) and requires the msr kernel driver to access hardware MSR registers.

Install the required packages across standard distributions:

# Ubuntu and Debian
sudo apt update && sudo apt install -y linux-tools-common linux-tools-generic linux-tools-$(uname -r)

# Fedora, RHEL, and Rocky Linux
sudo dnf install -y kernel-tools

Ensure the MSR driver is loaded into the kernel ring buffer:

sudo modprobe msr
lsmod | grep msr

Inspecting Current Core Bias Policies

Run the utility without parameters to inspect the current EPB values across every physical and logical core in the system:

sudo x86_energy_perf_policy -r

The command reports per-package, per-die, and per-core energy policies alongside HWP autonomous settings:

cpu0: EPB 6
cpu0: HWP_REQ: min 1 max 48 des 0 epp 128 window 0 pkg 0
cpu1: EPB 6
cpu1: HWP_REQ: min 1 max 48 des 0 epp 128 window 0 pkg 0

To inspect a concise summary of the system-wide policy without core-by-core verbosity, omit the raw flag:

sudo x86_energy_perf_policy

Configuring System-Wide Energy-Performance Bias

To change the bias policy across all CPU cores simultaneously, specify one of the standard policy profiles or pass an explicit integer value (0–15):

# Apply maximum performance bias for low-latency compute
sudo x86_energy_perf_policy performance

# Apply balanced performance bias
sudo x86_energy_perf_policy balance-performance

# Apply power saving bias
sudo x86_energy_perf_policy balance-power

# Pass a custom numerical register value (e.g., bias level 2)
sudo x86_energy_perf_policy 2

Verify that the new values are active across all cores:

sudo x86_energy_perf_policy | head -n 10

Configuring Per-Core Asymmetric Energy Policies

On hybrid microarchitectures (such as Intel Alder Lake, Raptor Lake, or Arrow Lake) combining Performance-cores (P-cores) and Efficient-cores (E-cores), administrators can enforce asymmetric policies. For example, configure P-cores (CPU 0–7) for peak performance while setting background E-cores (CPU 8–15) to balance-power:

# Assign maximum performance to primary execution cores
sudo x86_energy_perf_policy -c 0,1,2,3,4,5,6,7 performance

# Assign power conservation to background efficiency cores
sudo x86_energy_perf_policy -c 8,9,10,11,12,13,14,15 balance-power

Persisting EPB Policies Across System Reboots

Because MSR values reset to hardware firmware defaults upon system reboot or ACPI resume, persist custom energy policies using a dedicated systemd one-shot unit:

sudo nano /etc/systemd/system/cpu-energy-bias.service

Insert the following service specification:

[Unit]
Description=Apply CPU Energy-Performance Bias Policy
After=multi-user.target

[Service]
Type=oneshot
ExecStartPre=/sbin/modprobe msr
ExecStart=/usr/bin/x86_energy_perf_policy performance
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Reload systemd, enable the service, and activate it immediately:

sudo systemctl daemon-reload
sudo systemctl enable --now cpu-energy-bias.service
systemctl status cpu-energy-bias.service

Employing x86_energy_perf_policy gives Linux system administrators deterministic control over hardware MSR registers, ensuring CPU cores deliver optimal performance or thermal efficiency tailored to specific workload profiles.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.