-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pcp-mpstat shows inconsistent values as compared to mpstat #1922
Comments
For mpstat you have no "interval" parameter, so the reported values are the averaged values since boot time (different versions of mpstat over the past 50 years have had slightly different semantics, but the for the Linux version you're using here I think this is correct). For pcp-mpstat there is no way to report the averaged values since boot time, so the samples in the sample above are 4 consecutive live samples. This is one place where mpstat and pcp-mpstat are not the same, and perhaps the pcp-mpstat(1) man page should call this out. I've tried a more oranges-to-oranges comparison locally (only reporting the first two and last two CPUs). I ran these side-by-side, so they're not exactly the same sample interval, but close ...
(I chopped the "Average" lines from mpstat ... another undocumented difference 😄) Now these look pretty OK except they don't agree on %usr when %guest is significant ... I think this may be a difference of semantics, as the PCP metric that's behind the %usr number is
and mpstat is clearly not including %guest in %usr. Breaking the semantics of the PCP metric is probably a bad idea at this stage, so I think the options might be to (a) make pcp-mpstat the same as mpstat or (b) document the difference ... neither is ideal, so I'll solicit feedback. |
@kmcdonell I think this may be the kind of situation Mark added the vuser metric for? Might be as simple as just changing over to that metric here to match mpstat if we're lucky...
|
@kmcdonell that makes sense. |
$ mpstat -P ALL ; pcp mpstat -P ALL -s4
Linux 5.15.0-203.146.5.1.el9uek.x86_64 (sagsagar-pcp-pmval-test) 03/19/2024 x86_64 (4 CPU)
10:38:38 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
10:38:38 AM all 0.19 0.01 0.12 0.00 0.00 0.00 0.01 0.00 0.00 99.67
10:38:38 AM 0 0.16 0.01 0.12 0.00 0.00 0.00 0.00 0.00 0.00 99.71
10:38:38 AM 1 0.20 0.01 0.14 0.00 0.00 0.00 0.01 0.00 0.00 99.64
10:38:38 AM 2 0.19 0.00 0.13 0.00 0.00 0.00 0.01 0.00 0.00 99.67
10:38:38 AM 3 0.20 0.01 0.11 0.00 0.00 0.00 0.01 0.00 0.00 99.67
Linux 5.15.0-203.146.5.1.el9uek.x86_64 (sagsagar-pcp-pmval-test) 03/19/24 x86_64 (4 CPU)
Timestamp CPU %usr %nice %sys %iowait %irq %soft %steal %guest %nice %idle
10:38:39 all 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.53
10:38:39 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.78
10:38:39 1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.78
10:38:39 2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.78
10:38:39 3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98.78
Timestamp CPU %usr %nice %sys %iowait %irq %soft %steal %guest %nice %idle
10:38:40 all 0.25 0.0 0.25 0.0 0.0 0.0 0.0 0.0 0.0 99.52
10:38:40 0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.52
10:38:40 1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100.51
10:38:40 2 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 98.52
10:38:40 3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.52
Timestamp CPU %usr %nice %sys %iowait %irq %soft %steal %guest %nice %idle
10:38:41 all 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.58
10:38:41 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.58
10:38:41 1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.58
10:38:41 2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100.58
10:38:41 3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98.59
$
Here pcp-mpstat values are quite far from mpstat values
The above output has been taken on live system
The text was updated successfully, but these errors were encountered: