[ZBX-7109] Very slow processing of low-level discovered triggers Created: 2013 Oct 07  Updated: 2017 May 30  Resolved: 2014 Feb 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.9, 2.1.7
Fix Version/s: 2.0.11rc1, 2.2.2rc1, 2.3.0

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-7315 Deleting a large number of prototyped... Closed
is duplicated by ZBX-5781 zabbix server can create lld-triggers... Closed
is duplicated by ZBX-6315 LLD triggers are deleted immediately ... Closed

 Comments   
Comment by Alexander Vladishev [ 2013 Nov 07 ]

(1) Separated lld source code into several files

asaveljevs Looks good. Before closing, please take a look at r40087.

sasha Thanks! CLOSED

Available in branches/2.0 r40088.

Comment by Alexander Vladishev [ 2013 Nov 08 ]

Related issue: ZBX-7315

Comment by Alexander Vladishev [ 2013 Dec 16 ]

(2) moved filtering of lld rows to the one place

  • svn://svn.zabbix.com/branches/dev/ZBX-7109
  • svn://svn.zabbix.com/branches/dev/ZBX-7109_trunk

wiper svn://svn.zabbix.com/branches/dev/ZBX-7109 r41040 tested
svn://svn.zabbix.com/branches/dev/ZBX-7109_trunk r41045 tested

CLOSED

Available in pre-2.0.11 r41051, pre-2.2.2 r41053 and pre-2.3.0 (trunk) r41054.

Comment by richlv [ 2014 Jan 07 ]

(3) documented perf improvement in :
https://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew2011
https://www.zabbix.com/documentation/2.2/manual/introduction/whatsnew222

RESOLVED, please review

sasha added more details, please review.

<richlv> clarified a bit more, please, review

sasha Thank you! CLOSED

Comment by richlv [ 2014 Jan 07 ]

this also fixed ZBX-6315

Comment by Alexander Vladishev [ 2014 Jan 17 ]

Whats new:

  1. Better processing of trigger prototypes.
    • Already discovered triggers will be updated only if something changed.
    • Only changed fields will be updated.
    • Decreased number and size of sql queries.
    • Lost triggers will be deleted only after selected period ZBX-6315.
    • Better validation of fields after resolving of LLD macros.
      • validity of UTF-8 sequences
      • validity of fields lengths

Tests:

One discovery rule with 2 item prototypes and 2 trigger prototypes. Received 2048 new records.

2.0.11

Action Time, sec. Number of SQL requests Total size of SQL statements, bytes
first discovery (creating of 2 * 2048 = 4096 triggers) 58.192054 20505 4504138
next discovery (updating) 40.862417 16392 4511767
next discovery (changed expression in trigger prototypes) 6131.527467 4225040 736623181

2.0.11 with the fix

Action Time, sec. Number of SQL requests Total size of SQL statements, bytes
first discovery (creating of 2 * 2048 = 4096 triggers) 1.065422 34 1071045
next discovery (updating) 0.129869 9 1265
next discovery (changed expression in trigger prototypes) 1.128554 17 515629
Comment by Alexander Vladishev [ 2014 Jan 18 ]

Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-7109

Comment by Aleksandrs Saveljevs [ 2014 Jan 24 ]

(4) Parameter "parent_triggerid" in function DBlld_trigger_make() is unused. Also, this function has "DB" prefix, but it does not do anything with the database.

sasha RESOLVED in r41871

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2014 Jan 24 ]

(5) Please take a look at minor fixes during code review in r41875.

sasha Thanks! CLOSED

Comment by Alexander Vladishev [ 2014 Jan 27 ]

(6) [I] trunk: The fields trigger_discovery.name and trigger_discovery.triggerdiscoveryid should be removed.

sasha RESOLVED in r41936

sasha Already tested by asaveljevs CLOSED

Comment by Alexander Vladishev [ 2014 Jan 27 ]

Fixed in pre-2.0.11 r41917.

Comment by Alexander Vladishev [ 2014 Jan 28 ]

2.2 and trunk are fixed in the development branches:

  • svn://svn.zabbix.com/branches/dev/ZBX-7109-22
  • svn://svn.zabbix.com/branches/dev/ZBX-7109-23 (trunk)

asaveljevs In 2.2 branch, I have fixed a bunch of typos in r41984. Please take a look.
sasha CLOSED.

asaveljevs In trunk branch, database index after upgrade from 2.2 has a different name compared to that from a fresh database. REOPENED.
sasha Fixed in r42019. RESOLVED.
asaveljevs CLOSED.

Comment by yuusou [ 2014 Jan 29 ]

Will this patch re-create triggers and graphs that were deleted in previous versions?

Comment by Alexander Vladishev [ 2014 Jan 29 ]

yuusou,

We can't create such patch.

Comment by yuusou [ 2014 Jan 29 ]

Alexander,

If that's the case, then this rewrite doesn't fix ZBX-6315, is that correct? It's marked as a duplicate of this bug.

Comment by richlv [ 2014 Jan 29 ]

it does fix that - triggers won't get deleted in such case anymore.
triggers would get recreated based on prototypes next time the entity is discovered again.

Comment by Alexander Vladishev [ 2014 Jan 30 ]

Fixed in pre-2.2.2 r41993 and pre-2.3.0 r42023.

Comment by richlv [ 2014 Feb 02 ]

subissues (3) and (6) not closed, reopening

Comment by richlv [ 2014 Feb 02 ]

(7) i also moved trunk entry "[ZBX-7109] removed unused fields in trigger_discovery table" from new features to bugfixes, please check that it's ok

sasha Thanks, it will be better! CLOSED

Generated at Thu May 02 01:12:27 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.