Skip navigation

Add accurate CPU Frequency metric (based on APERF/MPERF counters)

score 65
You have not voted. Product Team Review

Overview:

Use APERF/MPERF CPU performance counters to measure current CPU frequency on Linux servers. Current method (whatever it is) seems not to be working properly for servers with power management driven by BIOS/firmware.

 

The need:

Lots of servers in my company have power management controlled by BIOS settings. This means that Linux kernel is not aware of the current clock frequency and data presented in /proc is not accurate. This metric is very important for any capacity models based on CPU utilization and - I believe - would be beneficial for other customers as well. Using standard CPU utilization metrics in such case (%busy) results in huge capacity prediction errors (CPU is non linear - the clock speed increases with the load).

 

The solution:

Use simple code based on the procedure used in Turbostat (from cpupowerutils package) to extract data from /proc/cpu/XX/msr and calculate real CPU frequency. Use it as a separate metric and to calculate the exact CPU utilization by multiplying it by %CPU busy. I have the working agent for AppDynamics and zabbix and will be happy to share all details in case BMC will be interested.

 

Comments

Vote history