You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain scenarios, the %idle PURR metric displays negative values [1],
while %busy PURR exceeds 100% giving users false impression of resource
utilisation. This occurs when delta_purr becomes greater than delta_tb,
causing the following expression to yield a negative value, particularly
during 100% system utilization for %idle PURR:
%idle = (delta_tb - delta_purr + delta_idle_purr) / delta_tb * 100;
Without change:
./lparstat -E 1 30
System Configuration
type=Shared mode=Uncapped smt=8 lcpu=20 mem=208057792 kB cpus=42 ent=2.00
---Actual--- -Normalized-
%busy %idle Frequency %busy %idle
------ ------ ------------- ------ ------
103.88 -3.88 2.75GHz[ 98%] 101.80 0.00
103.46 -3.46 2.67GHz[ 95%] 98.28 1.49
101.53 -1.53 2.74GHz[ 98%] 99.50 0.51
103.41 -3.41 2.70GHz[ 96%] 99.27 0.37
The delta_tb is computed using get_scaled_tb, which calculates the
timebase for a given time difference. Previously, nanoseconds were
ignored in the calculation of time difference, which led to delta_tb
being underestimated.
This patch addresses the issue by incorporating nanoseconds into the
time difference, ensuring precise calculations.
Also, rename get_time() to get_time_ns() to denote it returns time in
nanoseconds. get_delta_time() is introduced as a wrapper to get delta
time in seconds.
With change:
./lparstat -E 1 30
System Configuration
type=Shared mode=Uncapped smt=8 lcpu=20 mem=208057792 kB cpus=42 ent=2.00
---Actual--- -Normalized-
%busy %idle Frequency %busy %idle
------ ------ ------------- ------ ------
99.52 0.48 2.74GHz[ 98%] 97.53 2.66
99.53 0.47 2.71GHz[ 97%] 96.54 3.67
99.49 0.51 2.71GHz[ 97%] 96.51 3.87
99.51 0.49 2.70GHz[ 97%] 96.53 3.90
99.48 0.52 2.69GHz[ 96%] 95.50 4.38
[1] #103
Signed-off-by: Saket Kumar Bhaskar <[email protected]>
Signed-off-by: Tyrel Datwyler <[email protected]>
0 commit comments