Using cpupower to Control CPU Power States

Review x86_64 CPU statistics and change x86_64 CPU power states by using the cpupower command.

Before running the cpupower command, install the kernel-tools package. This prerequisite is the same regardless of whether Oracle Linux 8 runs on the Unbreakable Enterprise Kernel (UEK) or the Red Hat Compatible Kernel (RHCK).

For more information about the cpupower command, see the cpupower(1) manual page.

The cpupower monitor command can be used to display the current activity level for each CPU that's accessible to the system. To review the default generated report, run the following command:

cpupower monitor

For more information about options to customize the report output, see the cpupower-monitor(1) manual page.

In addition to activity statistics, the previous command also displays statistics for any C-states that have been activated to reduce power consumption for idle CPUs. To review a list of available C-states, run the following command:

cpupower idle-info

C-states can be enabled and disabled by using the idle-set command, and the -c option can be used to restrict those changes to a subset of the available CPUs. For more information about C-states and how to enable or disable them, see the cpupower-idle-info(1) manual page.

Oracle Linux systems can be optimized for maximum CPU performance, or conversely reduced CPU power consumption, by switching to a different CPU frequency governor. To review the active CPU frequency governor, run the following command:

sudo cpupower frequency-info

To review a list of available CPU frequency governors, add the --governors option to the previous command:

sudo cpupower frequency-info --governors

To switch to a different CPU frequency governor, use the cpupower frequency-set command. For example, to switch to the performance CPU frequency governor, run the following command:

sudo cpupower frequency-set --governor performance

For more information about CPU frequency governors and how to set them, see the cpupower-frequency-set(1) manual page.