Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17024

Slow performance problem history page

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unsupported version
    • Icon: Trivial Trivial
    • None
    • 4.2.8
    • API (A), Frontend (F)
    • None
    • Ubuntu 14.04, php 5.5.9

      When showing the history of problems, under certain circumstances it takes an excessive amount of time to load the list, even if the amount of items shown is not that large.

      1 example:

      I show the history of problems of a certain hostgroup within a limited amount of time (2h). The amount of events/problems shown is 59. This is the output of front-end debugging:

      ******************** Script profiler ********************
      Total time: 12.947887
      Total SQL time: 2.908803
      SQL count: 4330 (selects: 4293 | executes: 46)
      Peak memory usage: 128.5M
      Memory limit: 1024M
      

      Note the amount of queries it's processing, and also that most of the time is not even spent on the queries itself.

      Example of the queries which appear the most in the front-end debug output:

      SQL (0.001441): SELECT MAX(h.clock) FROM history h WHERE h.itemid='200200003613560' AND h.clock>1575277064
      zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → CScreenProblem->get() → getTriggerDependencies() → CMacrosResolverHelper::resolveTriggerNames() → CMacrosResolver->resolveTriggerNames() → CMacrosResolverGeneral->getItemMacros() → CHistoryManager->getLastValues() → CHistoryManager->getLastValuesFromSql() → DBselect() in include/classes/api/managers/CHistoryManager.php:156
      
      SQL (0.001487): SELECT * FROM history h WHERE h.itemid='200200003613560' AND h.clock='1575363219' ORDER BY h.ns DESC LIMIT 1
      zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → CScreenProblem->get() → getTriggerDependencies() → CMacrosResolverHelper::resolveTriggerNames() → CMacrosResolver->resolveTriggerNames() → CMacrosResolverGeneral->getItemMacros() → CHistoryManager->getLastValues() → CHistoryManager->getLastValuesFromSql() → DBselect() in include/classes/api/managers/CHistoryManager.php:169
      

      The hostgroup I'm filtering on counts 2450 hosts.

      This is all done as a Zabbix Super Admin, so permission checking should not be the issue.

      Please let me know if you need more information

            zalex_ua Oleksii Zagorskyi
            kdaudt Kevin Daudt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: