Closed baranyaib90 closed 6 months ago
This an inherent issue with the way the plugin was writen, as it measures while it runs.
So with a 200ms delay, it give it time to slow down from the initial burst.
Yes. I'm not interested about the CPU frequency while munin update is running. I want to graph it in normal circumstances.
Then you have to emit the average of the interval between 2 runs.
And that's rewriting the plugin to leverage state, as currently it isn't done.
This driver delivers only instant information about the CPU speed (at the time of the munin data collection). This is not necessarily representative for the real CPU speed history.
I would suggest to look at https://github.com/munin-monitoring/contrib/blob/master/plugins/cpu/multicpu1sec or its C version to craft a cpuspeed1sec
The maddening thing here is that some (many?) years ago there was a cpu governor related /proc
(or /sys
) file that counted time at each CPU speed level which would be the perfect data source for this, just let rrd track the change in the counter on each speed level.
And I wrote a plugin for it which I can't find.
But it might have been related to a specific version of speed governor and CPU.
Having the kernel tracking it would be perfect indeed
I've looked over everything I could think of on my intel laptop and this seems a pipe dream.
Taking performance metrics while munin-node is running the plugins is going to be a headache forever. And with the current information from /proc and /sys it seems we can only get the "instant" speed reading. I see the frequency changes very often. ... If only the cpu governor had a way to keep stats.
Just to clarify: I don't want this graph to draw the average frequency of the last 5 minutes. I know that thats not feasible. I'm fine with the instant frequency value. I only wanted to took out the munin update procedure's CPU burst from the picture, because that made a huge noise in my case (ref: "Graph by default" image). My 200ms sleep is good enough to "let the CPU change back to the frequency the system is mostly running". I hope you got my point.
I would recommend to change the plugin according to point 1 and 3 described at "Expected behavior" to mitigate the situation, since there is no easy proper solution. This plugin is enabled at almost every munin installation. It would be nice if the graph would be useful for users instead of being disabled by them.
Anyway: I'm fine with closing this ticket, I just wanted to let you know this. Thank you for checking it!
Can you check #1618 ?
Yes, I just did. Perfectly fine for me. Thank you very much!
Dear munin developers and mainainers! I would like to share my observations and solutions with you about cpuspeed plugin.
Describe the bug
Expected behavior
MINHZ=$(( $MINHZ - $MINHZ / 10 ))
here.sleep 0.2
before measuring CPU frequencies in the script (here). In my case this 200ms is enough for the Intel N100 CPU to slow down to normal frequency. For me that is an acceptable delay.To Reproduce Just have an idle system with Alder Lake or newer Intel CPU.
Screenshots & Logs nan value when frequency is bellow minimum. I had to zoom in to provide proof: Graph by default: After adding 200ms sleep before measurement and fixing minhz:
Environment
Additional context I have an Intel N100 CPU which changes frequency quite often (plenty time within a second). My setup is idle in most of the time, so mostly the CPU is running in minimum frequency.