This topic explains why inconsistency occurs between the CPU frequency displayed in the /proc/cpuinfo file and the frequency specified for the instance, and how to solve this inconsistency. Alibaba Cloud Linux 3 is used as an example.
Problem description
In the idle state, the CPU frequency displayed in the /proc/cpuinfo file is 800 MHz, which is inconsistent with the instance specification frequency, as shown below.

The solution described in this topic also covers the following kernels and operating systems:
Cause
To enhance system performance and CPU response, a patch (commit ID: 3fcd6a230fa7d03bffcb831a81b40435c146c12b) was integrated into the Linux kernel starting with version 5.11.
x86/cpu: Avoid cpuinfo-induced IPIing of idle CPUs
Currently, accessing /proc/cpuinfo sends IPIs to idle CPUs in order to
learn their clock frequency. Which is a bit strange, given that waking
them from idle likely significantly changes their clock frequency.
This commit therefore avoids sending /proc/cpuinfo-induced IPIs to
idle CPUs.The function rcu_is_idle_cpu checks whether the CPU is in the idle state when /proc/cpuinfo is accessed. If the CPU is idle, it returns min_freq , which is defined by the kernel as 800 MHz by default. In some kernel versions, we get the value of min_freq as the CPU base frequency.
Solution
The frequency displayed in the idle state may not match expectations, but the actual performance and usage are not affected, because the CPU can still reach the specification-defined frequency.
To obtain accurate frequency measurements, use tools such as cpupower or turbostat.
For example, the cpupower tool can be used to gather frequency data.
sudo cpupower frequency-infoThe following output shows that the current CPU frequency is 3,200 MHz:

Please note that some instance types may not support CPU frequency queries as described above. Refer to the Overview of instance families documentation for details on the base frequency of the specific instance.