System information
144 System Analysis and Tuning Guide
The monitor subcommand allows you to execute performance benchmarks and to
compare Kernel statistics with hardware statistics for specific workloads.
Example11.4: Example cpupower monitor Output
|Mperf || Idle_Stats
CPU | C0 | Cx | Freq || POLL | C1 | C2 | C3
0| 3.71| 96.29| 2833|| 0.00| 0.00| 0.02| 96.32
1| 100.0| -0.00| 2833|| 0.00| 0.00| 0.00| 0.00
2| 9.06| 90.94| 1983|| 0.00| 7.69| 6.98| 76.45
3| 7.43| 92.57| 2039|| 0.00| 2.60| 12.62| 77.52
Mperf shows the average frequency of a CPU, including boost frequencies, over
a period of time. Additionally, it shows the percentage of time the CPU has
been active (C0) or in any sleep state (Cx). The default sampling rate is 1 sec-
ond and the values are read directly from the hardware registers. As the turbo
states are managed by the BIOS, it is impossible to get the frequency values at
a given instant. On modern processors with turbo features the Mperf monitor is
the only way to find out about the frequency a certain CPU has been running in.
Idle_Stats shows the statistics of the cpuidle kernel subsystem. The kernel up-
dates these values every time an idle state is entered or left. Therefore there can
be some inaccuracy when cores are in an idle state for some time when the mea-
sure starts or ends.
Apart from the (general) monitors in the example above, other architecture-specific
monitors are available. For detailed information, refer to the cpupower-monitor
man page.
By comparing the values of the individual monitors, you can find correlations and de-
pendencies and evaluate how well the power saving mechanism works for a certain
workload. In Example11.4 (page144) you can see that CPU 0 is idle (the value of
Cx is near to 100%), but runs at a very high frequency. Additionally, the CPUs 0 and
1 have the same frequency values which means that there is a dependency between
them.
11.3.2.4 Modifying Current Settings with
cpupower
Similar to cpufreq-set, you can use cpupowerfrequency-set command
as root to modify current settings. It allows you to set values for the minimum or