scaling of loadavg in sensord
Hi all!
It make not much sense for sensord to scale the loadavg itself (*10):
RRDs work with floating-point values and thus do very well with non-integer values even < 1.
They can even be scaled later at display time by rrdtool itself, if the user wants it.
The attached patch removes the scaling of loadvg in sensord.
Bye,
Aurelien
Signature · 11 lines
.''`. Aurelien Jarno GPG: 1024D/F1BCDB73 : :' : Debian GNU/Linux developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net -------------- next part -------------- A non-text attachment was scrubbed... Name: sensord.loadavg_scale.patch Type: text/x-patch Size: 757 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20041025/42030cdd/sensord.loadavg_scale.bin
Jean Delvare
AppliedQuoted 6 lines
It make not much sense for sensord to scale the loadavg itself (*10):
RRDs work with floating-point values and thus do very well with non-integer values even < 1.They can even be scaled later at display time by rrdtool itself, if the user wants it.
Agreed.
Quoted 1 line
The attached patch removes the scaling of loadvg in sensord.
Applied, thanks.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 3 lines
Currently sensord is logging load1 when used with the --load-average option. It does not make much sense to do that for a 5 minutes RRD update interval (the default one).
I think it does. The fact that the update interval is 5 minutes is hardly relevant. The point is that sensord reports instant measurements for everything (voltages, temperatures, etc...) and the 1 minute average load is the nearest value from instant load.
Quoted 6 lines
The best solution is to let the user to choose which load he wanted to log according to the update interval and other things.
That's the purpose of the attached patch. Using it, it possible to select the load average to log. For example --load-average 1,5,15 logs load1, load5 and load15.
I don't think this belongs to sensord. Sensord is not a system monitoring daemon but a hardware monitoring daemon. The only reason why load "average" is included is that several monitored values (CPU temp first) may depend on the instant system load. Logging load5 or load15 doesn't make much sense IMHO.
The only think I would agree isn't really right is the name of the option. --load-average should be --load instead (or maybe --instant-load, although it could be even more misleading since that's not exactly what load1 is). I don't think it's worth breaking the interface though.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 3 lines · Jean Delvare
I agree that the thermal curve will depend on the system, and I guess this is the reason why you want the user to be able to choose which average load he/she wants to compare the temperature with.
That's exactly the point.
Quoted 5 lines
I believe that people needing more accurate temperature vs. load curves are better lowering the sampling rate to one every minute than averaging the cpu load over a longer period of time. Comparing an instant temperature with an average load doesn't make much sense unless you assume that the instant temperature is actually a form of average
Of course, you are right: load1 is the best equivalent to an "instant" value, we have.
However, sensord is able to cope with different sample rates. Users configure it to fit their needs. Users needs are quite different, as we all know :) And if the user decides to have a samplerate of 5 minutes (because temperatures shrink slower than they grow perhaps), a load average of 5 minutes would perhaps give him better results, because temp is still high, but load1 doesn't show anything anymore. However, load5 would still show the peak that lead to the temperature growth.
Quoted 2 lines
Yes, I noticed that and this is great if we'd end up applying the patch. I still need to be convinced that we want to do that though.
Well, we agree that sensord is not a system monitor at all. Perhaps we also agree, that it's nice to monitor load together with sensord anyways, because it just sometimes makes sense. This patch just rounds this nice-to-have-thing up: it gives the user the flexibility to choose whatever fits his needs best.
And - perhaps even more important (especially for you as developers :)) - its not that big thing at all and it's capsulated well. Once it works, there are not much "new" or "change" issues to expect from it.
Quoted 3 lines
where values are missing, right? Does rrd do any averaging in the regular case? I think there was a discussion about this some months ago but I cannot seem to remember where they did led us.
Well, on the one hand, rrd does averaging when it's needed for displaying data. For example, if your window is too big to show single raw "data points", it generates new averaged "data points" to show.
On the other hand, rrd does also averaging on the raw "data points", when they appear out of time. For example, if your RR-database has "data slots" every full minute and your data arrives 30 seconds later, it averages the "slot data".
The first is expected and wanted. The latter led us to a patch (already applied) that made sure, sensord collects the data as near as possible to the "data slots", i.e. for one-minute-slots it forces sensord to collect and store the data at the full minutes and not 28 seconds later for example.
So, just consider the discussion about rrds averaging as finished :)
regards,
Mario
Signature · 2 lines
Whenever you design a better fool-proof software, the genetic pool will always design a better fool.
Hi all!
Currently sensord is logging load1 when used with the --load-average option. It does not make much sense to do that for a 5 minutes RRD update interval (the default one).
The best solution is to let the user to choose which load he wanted to log according to the update interval and other things.
That's the purpose of the attached patch. Using it, it possible to select the load average to log. For example --load-average 1,5,15 logs load1, load5 and load15.
Please note that it should be applied after the patch I sent this morning (scaling of loadavg).
Bye,
Aurelien
Signature · 12 lines
.''`. Aurelien Jarno GPG: 1024D/F1BCDB73 : :' : Debian GNU/Linux developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net -------------- next part -------------- A non-text attachment was scrubbed... Name: sensord.loadavg_1_5_15.patch Type: text/x-patch Size: 7827 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20041025/90dcd789/sensord.loadavg_1_5_15.bin
[CCing Mario who originally submitted the bug report]
Quoted 9 lines · Jean Delvare
Quoted 3 lines
Currently sensord is logging load1 when used with the --load-average option. It does not make much sense to do that for a 5 minutes RRD update interval (the default one).
I think it does. The fact that the update interval is 5 minutes is hardly relevant. The point is that sensord reports instant measurements for everything (voltages, temperatures, etc...) and the 1 minute average load is the nearest value from instant load.
I agree with that, however, the others measurements (and particularly temperatures) are changing slowly so that interpolation done bye RRD can work. This is not the case of the load.
Quoted 8 lines
Quoted 6 lines
The best solution is to let the user to choose which load he wanted to log according to the update interval and other things.
That's the purpose of the attached patch. Using it, it possible to select the load average to log. For example --load-average 1,5,15 logs load1, load5 and load15.
Quoted 5 lines
I don't think this belongs to sensord. Sensord is not a system monitoring daemon but a hardware monitoring daemon. The only reason why load "average" is included is that several monitored values (CPU temp first) may depend on the instant system load. Logging load5 or load15 doesn't make much sense IMHO.
Ok, here is an example. Imagine that your system has a high load during the first four minutes of a five minutes interval, and a low load the during last minute. In that case the CPU temperature would still be high, but the load would be low if load1 is logged. So logging load1 in that case wouldn't make much sense. In that case logging load5 is a better idea IMHO.
Quoted 5 lines
The only think I would agree isn't really right is the name of the option. --load-average should be --load instead (or maybe --instant-load, although it could be even more misleading since that's not exactly what load1 is). I don't think it's worth breaking the interface though.
BTW, the patch doesn't break the interface as the argument is optional. --load-average without arguments goes back to the previous behavior.
Signature · 4 lines
.''`. Aurelien Jarno GPG: 1024D/F1BCDB73 : :' : Debian GNU/Linux developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net
Hi Aurelien, hi Mario,
Quoted 8 lines
Quoted 4 lines
I think it does. The fact that the update interval is 5 minutes is hardly relevant. The point is that sensord reports instant measurements for everything (voltages, temperatures, etc...) and the 1 minute average load is the nearest value from instant load.
I agree with that, however, the others measurements (and particularly temperatures) are changing slowly so that interpolation done bye RRD can work. This is not the case of the load.
Not true. CPU core temperatures change very quickly and integrated thermal diodes report that very accurately. The CPU temperature reported for my Pentium III CPU can chage as quickly as +10 degree C in a second when I start some heavy job on the system. In turn, systems with automatic fan speed control may see fast fan speed changes (although probably not as fast as the temperature itself due to the mechanical nature of fans).
So I cannot see much difference between load1 and hardware monitored values in terms of latency. If there is any, them load1 may be _more_ of an average value than the measured values.
Quoted 6 lines
Quoted 5 lines
I don't think this belongs to sensord. Sensord is not a system monitoring daemon but a hardware monitoring daemon. The only reason why load "average" is included is that several monitored values (CPU temp first) may depend on the instant system load. Logging load5 or load15 doesn't make much sense IMHO.
Quoted 6 lines
Ok, here is an example. Imagine that your system has a high load during the first four minutes of a five minutes interval, and a low load the during last minute. In that case the CPU temperature would still be high, but the load would be low if load1 is logged. So logging load1 in that case wouldn't make much sense. In that case logging load5 is a better idea IMHO.
The CPU temperature may not be that high. It really depends on how the temperature is measured (internal diode or socket thermistor) and the cooling solution efficiency. Some systems will need way less than one minute to come back to their "original" temperature.
I agree that the thermal curve will depend on the system, and I guess this is the reason why you want the user to be able to choose which average load he/she wants to compare the temperature with.
I believe that people needing more accurate temperature vs. load curves are better lowering the sampling rate to one every minute than averaging the cpu load over a longer period of time. Comparing an instant temperature with an average load doesn't make much sense unless you assume that the instant temperature is actually a form of average temperature too. However, in the best case (actually the worst case, where heat dissipation is bad) the measured temperature will represent the lowest point to which the CPU temperature was able to drop since its last effort. This is not an average value. You may think of it that way because it is between the busy temperature and the long run idle temperature, but this doesn't make it an average value at all.
Quoted 2 lines
BTW, the patch doesn't break the interface as the argument is optional. --load-average without arguments goes back to the previous behavior.
Yes, I noticed that and this is great if we'd end up applying the patch. I still need to be convinced that we want to do that though.
As a side note, I may lack some knowledge about the way sensord and rrd work together. Sensord samples all sensors every 5 minutes and sends raw values to rrd, which is responsible for storing them and interpolating where values are missing, right? Does rrd do any averaging in the regular case? I think there was a discussion about this some months ago but I cannot seem to remember where they did led us.
Thanks.
--
Jean Delvare