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

Bad performance of Problems dashboard widget

    XMLWordPrintable

    Details

      Description

      ******************** Script profiler ********************
      Total time: 41.561607
      Total SQL time: 36.815946
      SQL count: 451 (selects: 256 | executes: 195)
      Peak memory usage: 229M
      Memory limit: 512M
      

      Below the causing SQL statements (<=0.0 excluded)

      SQL (3.69868): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673559' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.591452): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673378' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.544861): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673328' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.568175): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673250' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.565538): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673222' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.537292): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673183' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.52973): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390673003' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.53803): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390672806' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.531807): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390672622' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      SQL (3.528341): SELECT DISTINCT e.eventid,e.clock,e.ns,e.objectid,er1.r_eventid FROM events e LEFT JOIN event_recovery er1 ON er1.eventid=e.eventid WHERE e.source='0' AND e.object='0' AND e.objectid='688254' AND e.eventid<='390672448' AND e.value='1' ORDER BY e.eventid DESC LIMIT 20
      

      In comparison the script profiler output of accessing the Problems view directly:

      ******************** Script profiler ********************
      Total time: 5.989835
      Total SQL time: 0.989707
      SQL count: 522 (selects: 397 | executes: 125)
      Peak memory usage: 229M
      Memory limit: 512M
      

      Well, this not really fast as well but still significant faster then the widget.

      PS: The test has been made with a badly tuned test database system.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            okkuv9xh Marc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: