-
Problem report
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
Sprint 97 (Feb 2023), Sprint 98 (Mar 2023)
-
1
Self monitoring uses clock_t times(struct tms *buffer) function to get real time ticks. Besides returning ticks it also gets process user and system times, which apparently causes considerable overhead. This is not noticeable when called once per second in poller type processes, but can double (depending on workload) service/worker process cpu load.
Passing NULL buffer solves this problem on Linux (and maybe some other systems/versions, who knows). Rather than checking OS it will be simpler to add m4 script to check if NULL can be passed to times() function.