[ZBX-22311] High cpu overhead when self monitoring used in IPC/thread based processes Created: 2023 Feb 07  Updated: 2024 Apr 10  Resolved: 2023 Mar 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 6.4.1rc1, 7.0.0alpha1, 7.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Andris Zeila Assignee: Andris Zeila
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team A
Sprint: Sprint 97 (Feb 2023), Sprint 98 (Mar 2023)
Story Points: 1

 Description   

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.



 Comments   
Comment by Andris Zeila [ 2023 Mar 13 ]

Released ZBX-22311 in:

  • pre-6.4.1rc1 d098030e684
  • pre-7.0.0alpha1 778e0faa8ee
Generated at Sun Apr 20 20:33:16 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.