Querry P-states in Ubuntu 22.04
P-states (performance states) are different power and performance levels that a CPU can operate at. The CPU can dynamically switch between these states depending on the workload, in order to conserve energy or increase performance as needed.
Each P-state is defined by a specific operating frequency and voltage level. Lower P-states correspond to lower frequencies and voltages, which result in lower power consumption. Higher P-states correspond to higher frequencies and voltages, which result in higher performance.
By using P-states, the CPU can automatically adjust its performance and power consumption to match the current workload, without the need for manual configuration. This helps to optimize system performance and reduce power consumption, resulting in improved battery life for laptops and reduced energy costs for servers and other large-scale systems.
You can query the P-states (processor performance states) under Ubuntu 22.04 by using the cpufreq-info tool. This tool is part of the cpufrequtils package, which you can install by running the following command in your terminal:
sudo apt-get install cpufrequtils
Once the package is installed, you can use the following command to display information about the available P-states:
cpufreq-info
This will show you information such as the current frequency, the available frequencies, and the CPU governor (the on-demand governor is typically the default).