Sapmachine #2392: Add load average to vitals - #2393
Conversation
What does it look like? |
MBaesken
left a comment
There was a problem hiding this comment.
Some small comments/suggestions but seems to be okay.
| value_t load_average; | ||
|
|
||
| // Use the minute resolution until an age of 2.5 minutes | ||
| // and 5 minute resulution until an age of 7.5 minutes. |
|
Or why not add all 3 values, if the table is large anyways ? |
|
It is currently not possible to change the column header for the different tables. And it would not be easy to change that. Currently the type of load average used is determined by the resolution of the table. In the short time table the samples are 10 seconds apart, so seeing the 15 minute load average is not really that useful compared to the 1 minute average. On the other hand, in the long term table the sample interval is 1 hour and there the 15 minute average better represents the 1 hour interval than the shorter average. I think the main question to answer with the load average is: Was the system in the sample interval overloaded? And for this one should look at the load average type which is nearest to the sample interval. If you're really interested in the type you see, one could annotate the type in the non-raw output. E.g. for a 120 percent load instead of using "120" one could use "120/1", 120/5" or "120/15" . |
|
I think tr and tb was used as these are well known metrics from the system e.g. from vmstat. I used them in the past sometimes. Not sure if others rely on these. |
| value_t rl15 = (value_t) MAX2(0.0, MIN2(65535.0, proc_scale_factor * l15)); | ||
| // We put the three values into one, since we want to display | ||
| // the longer averaged one in table with coarser resolution. | ||
| _syst_ldavg = (rl1 << 32) | (rl5 << 16) | rl15; |
There was a problem hiding this comment.
How meaningful will this be in the "Last 60 minutes section" with 10 seconds interval?
There was a problem hiding this comment.
In the 10 second interval table the 1 minute average will be used, which covers 6 times the sample interval. While not ideal, it is easy to see the general change of the load compared to the previous sample.
OK, I will not touch it. |
This adds the load average to the vitals.
Since there are actually 3 load average values (taken over 1 minute, 5 minutes or 15 minutes) and the vitals table are already cryz big, this only adds one of the values which is most appropriate for the table (short term or long term).
The load average is given in percent, with 100 percent meaning the system has exactly as many CPUs as runnable threads. This is done so we don't have to know the number of CPUs on the system to see if the system is overloaded.
In principle with the load average added. the "tr" column could be removed, since it is analog to the load average for a very small interval. Since this makes the value fluctuate wildly, not be suitable for the long term table and needs knowing the number of CPUs to interpret it, we could remove it. On the other hand, who knows who uses it and would not be happy to see it removed.
fixes #2392