On Fri, Apr 24, 2020 at 12:17:19PM +0200, Rainer Jung wrote:
> 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).

I definitely like the patch, it has bothered me that the "per second" 
stats are not very useful but wasn't sure how to make it better.

This is also an interesting idea.

So you would suggest having a new monitor hook which runs REALLY_LAST in 
the order, calls ap_get_sload() and stores it in a global, and then we'd 
have an ap_get_cached_sload() (or whatever) which gives you the cached 
data from the last iteration?  Or are you thinking of a more 
sophisticated API which does the "diff" between intervals internally?

Regards, Joe

> 
> 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
> 

Reply via email to