Thinking further: I think it would make sense to have a module or core
implement the monitor hook to generate that derived data (requests/sec,
bytes/sec, durationMs/request, avgConcurrency) in the last monitor
interval and to provide that data to consumers like mod_systemd or - new
- mod_status - instead of the long term averages since start. It could
probably be added to the code that already provides "sload". That way
mod_status would also profit from the more precise average values (taken
over the last monitor interval).
Regards,
Rainer
Am 23.04.2020 um 21:29 schrieb Rainer Jung:
Hi all,
triggered by the new mod_systemd I drafted a patch to enhance the
monitoring data it provides during the monitor hook run.
Currently it publishes important data, like idle and busy slots and
total request count, but also not so useful info like requests/second
and bytes/second as a long term average (since start). These two figues
tend to become near constant after a longer time of operation.
Since the monitor hook of the module always seems to run in the same
(parent) process, it is easy to remember the previous request and byte
count data and average only over the last monitor hook interval. This
should give more meaningful data. And is a change local to mod_systemd.
In addition we have a third metric available in the scoreboard, namely
the total request duration. From that we can get the average request
duration and the average request concurrency. This part also needs a
change to the sload structure. Maybe we need a minor MMN bump for that.
I scetched a patch under
home.apache.org/~rjung/patches/httpd-trunk-mod_systemd-interval-stats.patch
Any comments, likes or dislikes?
Thanks and regards,
Rainer