[ZBXNEXT-8076] Add command-R prof_enable for determining mutex contention and profiling Created: 2022 Nov 02  Updated: 2024 Apr 10  Resolved: 2023 Jan 23

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: 6.0.13rc1, 6.4.0beta5, 6.4 (plan)

Type: Change Request Priority: Trivial
Reporter: Vladislavs Sokurenko Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File ZBX-19307-5.0-profiling-6.diff     PNG File image-2022-12-12-11-56-59-185.png    
Issue Links:
Sub-task
part of ZBXNEXT-4079 Internal items to monitor cache locking Open
Team: Team A
Sprint: Sprint 94 (Nov 2022), Sprint 95 (Dec 2022), Sprint 96 (Jan 2023)
Story Points: 2

 Description   

It can be useful to determine bottlenecks in Zabbix server by implementing per process commands prof_enable and prof_disable that will enable profiling of mutexes such as how long mutex was held and how long waited to acquire it as well as profiling of how much time was spent for history sync in total and how much time out of it was spent on inserting history into database, thus can determine how long waited on locks and how long worked with database, profiling of other places can be added in future a well.

Example use case to determine that system information was holding locks for too long and did not allow history syncers to process history:
ZBX-21537

Patch:
ZBX-19307-5.0-profiling-6.diff

If profiling is enabled for process then it will write results every 30 seconds to log file until disabled, profiling will be as lightweight as possible by using pointer to constant string in a vector.



 Comments   
Comment by Vladislavs Sokurenko [ 2022 Dec 13 ]

Implemented in:

Comment by Martins Valkovskis [ 2022 Dec 20 ]

Updated documentation:

Generated at Sun Apr 20 21:22:03 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.