[ZBX-9102] System Status widget is slow on a big installation. Created: 2014 Dec 03  Updated: 2017 May 30  Resolved: 2015 Mar 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 2.2.6
Fix Version/s: 2.2.10rc1, 2.4.5rc1, 2.5.0

Type: Incident report Priority: Blocker
Reporter: Oleg Ivanivskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: dashboard, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

This debug for a user with access to 3 hosts.

SQL (10.818281): SELECT DISTINCT t.triggerid,t.priority,t.state,t.description,t.error,t.value,t.lastchange,t.expression FROM triggers t,functions f,items i,hosts_groups hg WHERE NOT EXISTS (SELECT NULL FROM functions f,items i,hosts_groups hgg LEFT JOIN rights r ON r.id=hgg.groupid AND r.groupid='62' WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.hostid=hgg.hostid GROUP BY i.hostid HAVING MAX(permission)<2 OR MIN(permission) IS NULL OR MIN(permission)=0) AND hg.hostid=i.hostid AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND hg.groupid='167' AND NOT EXISTS (SELECT NULL FROM functions f,items i,hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.hostid=h.hostid AND (i.status<>0 OR h.status<>0)) AND t.status=0 AND t.value='1' AND t.flags IN ('0','4') ORDER BY t.lastchange DESC
dashboard.php:142 ? make_system_status() ? CAPIObject->get() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CTrigger->get() ? CZBXAPI->customFetch() ? DBselect() in /zabbix/include/classes/api/CZBXAPI.php:1016
******************** Script profiler ********************
Total time: 13.208669
Total SQL time: 11.940816
SQL count: 513 (selects: 498 | executes: 15)
Peak memory usage: 32M
Memory limit: 756M


 Comments   
Comment by Marc [ 2014 Dec 03 ]

Noticed in ZBX-6557 too.

Comment by Ivo Kurzemnieks [ 2015 Jan 23 ]

(1) No translation string changes.

oleg.egorov CLOSED

Comment by Ivo Kurzemnieks [ 2015 Jan 23 ]

RESOLVED for 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9102

Comment by Oleg Egorov (Inactive) [ 2015 Jan 28 ]

TESTED, now script execution time up to 3-3.5 times faster.
But should be retested by issue reporter.

Comment by Oleg Egorov (Inactive) [ 2015 Mar 16 ]

TESTED

Comment by Ivo Kurzemnieks [ 2015 Mar 16 ]

Fixed in:

  • pre-2.2.10rc1 r52761, (r52762 changelog)
  • pre-2.4.5rc1 r52763
  • pre-2.5.0 (trunk) r52764
Generated at Tue Apr 23 18:23:17 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.