[ZBX-4357] Expanding macros TRIGGER.EVENTS.* is noticeable hard task for DB. Created: 2011 Nov 16 Updated: 2019 Aug 27 Resolved: 2019 Aug 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.8 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | database, macros, performance | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 6.0.3 |
Attachments: |
![]() ![]() ![]() |
||||
Issue Links: |
|
Description |
Hard macros list: {TRIGGER.EVENTS.UNACK} {TRIGGER.EVENTS.PROBLEM.UNACK} {TRIGGER.EVENTS.ACK} {TRIGGER.EVENTS.PROBLEM.ACK} Action's settings, configured macros: {EVENT.ID} {TRIGGER.EVENTS.UNACK} {TRIGGER.EVENTS.PROBLEM.UNACK} {TRIGGER.EVENTS.ACK} {TRIGGER.EVENTS.PROBLEM.ACK} Current count of events (not so big, btw): mysql> select count(*) from events; 330984 Results: see filtered out only informative lines "events_is_not_empty.txt" 24058:20111116:112224.185 In process_escalations() 24058:20111116:112224.189 In substitute_simple_macros() data:'{EVENT.ID} 24058:20111116:112224.189 query [txnlev:1] [select count(*) from events where object=0 and objectid=13141 and value in (1,0) and acknowledged=0] 24058:20111116:112224.513 query [txnlev:1] [select count(*) from events where object=0 and objectid=13141 and value in (1) and acknowledged=0] 24058:20111116:112224.826 query [txnlev:1] [select count(*) from events where object=0 and objectid=13141 and value in (1,0) and acknowledged=1] 24058:20111116:112225.137 query [txnlev:1] [select count(*) from events where object=0 and objectid=13141 and value in (1) and acknowledged=1] 24058:20111116:112225.453 escalator #1 spent 1.267491 seconds while processing escalations Conclusion: every time when escalator process is working and only for first event, it spends to much time to expand mentioned macros. Table "events" was truncated at 12:35 and the experiment is performed again. Both stages you can see at the attached picture. Possible solution (IMO): creation of additional index. added note: at the attached picture in the graph "Count of SQL queries" the changes are counted in interval of 1 minute. |
Comments |
Comment by Vladislavs Boborikins (Inactive) [ 2019 Aug 27 ] |
Hello, Since this version of Zabbix is no longer supported, we've decided not to prioritize this bug for the near future and close the issue with "Won't fix" resolution. Please let us know if this decision should be reconsidered. Regards |