[ZBX-6118] Very low performance changing template linked with many hosts Created: 2013 Jan 14  Updated: 2024 Apr 10  Resolved: 2018 Feb 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.5rc1, 2.1.0
Fix Version/s: 3.4.8rc1, 4.0.0alpha4, 4.0 (plan)

Type: Problem report Priority: Critical
Reporter: Oleksii Zagorskyi Assignee: Alexander Vladishev
Resolution: Fixed Votes: 14
Labels: massupdate, performance, templatelinking
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RedHat OS
MySQL Percona 5.5.29.
Related PHP conf: 1GB memory_limit, 1h max_execution_time
Database installed in a 64GB RAM and SSD-only server.

my.cnf has been tunned well.


Issue Links:
Causes
causes ZBX-14896 after ZBX-6118, still low performance... Closed
causes ZBX-14865 importing template error - Field "par... Closed
Duplicate
duplicates ZBX-2494 deadlock between server and frontend Closed
is duplicated by ZBX-9620 Zabbix database server CPU 100%,when ... Closed
is duplicated by ZBX-7701 Makes changes to templates links to l... Closed
is duplicated by ZBX-13348 Low performance creating Graph in tem... Confirmed
is duplicated by ZBX-13349 Low performance creating Web Scenari... Confirmed
Team: Team B
Sprint: Sprint 24, Sprint 25, Sprint 26, Sprint 27
Story Points: 4

 Description   

Only Zabbix Super Admin used always !

On 2.0.3:
We have a host template with 50 items and 10 triggers linked to 20.000 hosts approx.
When we create/modify/delete an item/trigger the process fails after a long while (>30mins) and huge memory/cpu usage.

With templates linked to less hosts (~100 hosts) everything works fine.

On 2.0.5rc1 rev ~32712 (included bunch of expected performance improvements):
We tried 2.0.5rc1 and it doesn't solve the problem:
we change an item in a template linked to 10.000 hosts and it takes approx 20 minutes which is too long for the user to wait.
we change an item in a template linked to 20.000 hosts and after a while (and huge cpu load) the process fails leaving just some hosts with the new added item.



 Comments   
Comment by Oleksii Zagorskyi [ 2013 Jan 16 ]

The problem now is the timeout. The memory problem existed before but we solved it increasing the corresponding parameter. Now the problem is that it takes more than 30min.

Comment by Marc [ 2013 Jul 17 ]

Maybe ZBX-6774 could here be helpful as well...

Comment by Sergey Ganenko [ 2014 Jul 17 ]

I also encountered this problem, template linked to ~19000 hosts, the process of modify template fails after >30 min.
I solved this problem only into groups attached to different identical templates, but this workaround.
maybe there is another solution this problem?

Comment by waydeechen [ 2015 Jul 15 ]

could this issue be optimized ?

the hosts linked to linux template is very large, and i can not modify the template

now i split linux template to ten templates, but this does not solve the problem,please help

Comment by Marc [ 2015 Jul 15 ]

I believe ZBXNEXT-2519 is the way to go for.

Comment by waydeechen [ 2015 Oct 29 ]

Does zabbix 3.0 resolved this problem ?

Comment by Marc [ 2015 Nov 18 ]

waydeechen,

it's not on the roadmap (anymore).

Comment by Oleksii Zagorskyi [ 2016 Mar 14 ]

ZBX-7700 is a bit related to this one

Comment by zhang [ 2016 Jul 16 ]

I also encountered this problem. We have a very large environment(~ 16141 hosts), when "unlink and clear" template from host, it never be successful!

Comment by richlv [ 2016 Oct 14 ]

it might be worth closing this one in favour of the older ZBX-5640 and handling generally bad api performance there

Comment by Alexander Vladishev [ 2018 Jan 14 ]

(1) Translation strings changes

Strings added:

  • Item prototype "%1$s" already exists on "%2$s", linked to another rule.

Strings deleted:

  • Created: Discovery rule "%1$s" on "%2$s".
  • Created: Item "%1$s" on "%2$s".
  • Created: Item prototype "%1$s" on "%2$s".
  • Deleted: Discovery rule "%1$s" on "%2$s".
  • Deleted: Item "%1$s" on "%2$s".
  • Deleted: Item prototype "%1$s" on "%2$s".
  • Updated: Discovery rule "%1$s" on "%2$s".
  • Updated: Item "%1$s" on "%2$s".
  • Updated: Item prototype "%1$s" on "%2$s".

HunterCRS CLOSED

Comment by Alexander Vladishev [ 2018 Jan 14 ]

Available in development branch svn://svn.zabbix.com/branches/dev/ZBX-6118.

Improved performance of create(), update() and template linkage methods for item, discoveryrule and itemprototype classes.

Comment by Alexander Vladishev [ 2018 Jan 15 ]

Related issue: ZBX-13335.

Comment by Alexander Vladishev [ 2018 Feb 17 ]

Available in 3.4.8rc1 r77777 and 4.0.0alpha4 (trunk) r77778.

Comment by Sergei Prutskikh [ 2018 Jul 31 ]

This problem also connected to triggers. Did you solve this problem for update triggers also?

Comment by Oleksii Zagorskyi [ 2018 Sep 24 ]

just to keep things linked, related performance issue - ZBX-14648 "slow deletion of item in template linked to many hosts"

Comment by Oleksii Zagorskyi [ 2018 Sep 24 ]

The performance issue will be considered again in a ZBX-14896

Generated at Wed Apr 24 15:33:00 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.