Notes for CPU Usage
Help Documents menu

Notes for CPU Usage

Updated on: 2022-11-10 14:48

Android:

CPU Usage: the traditional CPU usage and also referred to as unnormalized CPU usage

Calculation method: CPU Usage = CPU execution time / Total CPU time at current CPU frequency.
Remark: the CPU usages obtained by Android Studuio or Adb are usually both an unnormalized usage.

CPU Usage (Normalized)

Because the CPU frequency of mobile devices changes all the time, if the traditional CPU usage calculation method is used, the CPU usage at a low frequency and that at a high frequency may be both calculated to be 30%. In spite of being the same as 30%, their performance consumptions are totally different. Obviously, the consumption at high frequency is higher. The traditional CPU usage cannot really reflect the performance consumption anymore.

Thus, we need a normalized (measurable) statistics method. It also takes the frequency factor into account.

CPU Usage (Normalized) = (CPU execution time / Total CPU time) * (Sum of all the CPU frequencies at current moment / Sum of all the CPU’s maximum frequencies).

The PerfDog provides both statistics methods. CPU Usage is unnormalized by default. It is recommended to use the normalized CPU usage as the indicator to measure the performance.

Remark: a very few parts of mobile phones cannot test the normalized CPU usage temporarily. Please restart them to try.

iOS:

The PerfDog makes the statistics of the traditional CPU usage and the CPU usage is unnormalized by default. For the iOS platform, the frequency change usually occurs only at the extreme cases such as extremely low battery and locked screen. Therefore, the normalization makes little sense.