ExportXMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Major
    • 8.0.1rc1, 8.2.0alpha1
    • 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:

      1. Prepare a system with 600k items spread across hosts
      2. 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. 

            Assignee:
            Zabbix Development Team
            Reporter:
            Alex Kalimulin
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: