-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Major
-
Affects Version/s: 8.0.0, 8.2.0alpha1
-
Component/s: Server (S)
-
None
-
Environment:Ubuntu 26.04, MySQL 8.4
-
Sprint candidates
The time the server needs to link one template to one LLD host grows proportionally with the total number of all items in the database.
- 20k items - 13 ms per host
- 80k items - 0.15 s per host
- 600k items - 3.7 s per host
On 8.0.0 with 600k items, linking one template to 2500 discovered hosts took 2h 30m.
Steps to reproduce:
- Prepare a system with 600k items spread across hosts
- Discover another 2500 hosts with templates
Result:
Discovery takes 2h 30m.
Expected:
Few seconds.
Analysis:
Query in zbx_db_save_item_template_cache() walks the template chain of every item and filters by the new item ids afterwards. So this is a full items table scan per each host.
- related to
-
ZBX-27292 LLD worker hangs on 90% CPU usage when linking template to existing hosts
-
- Closed
-