Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22311

High cpu overhead when self monitoring used in IPC/thread based processes

XMLWordPrintable

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

            wiper Andris Zeila
            wiper Andris Zeila
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: