-
Patch request
-
Resolution: Duplicate
-
Critical
-
None
-
3.4.14
Hello.
I have problem to slow load wiget problem.
Problem looks like in
https://support.zabbix.com/browse/ZBX-13635
https://support.zabbix.com/browse/ZBX-13417
If 30 users open one time them dashboard, that case very big cpu load on sql.
My environment:
- zabbix-3.14 6CPU 8RAM
- mysql 5.7 8 cpu 32RAM
- 5 proxys
Problem are in a long sql query.
SELECT DISTINCT e.eventid, e.clock, e.ns, e.objectid, er?.r_eventid FROM events e LEFT JOIN event_recovery er? ON er?.eventid=e.eventid WHERE e.source=? AND e.object=? AND e.objectid=? AND e.eventid<=? AND e.value=? ORDER BY e.eventid DESC limit ?
A fix slow query execution by adding 2 indexes.
It boost up query execution in 1000 times.
From 30 sec to 0.03
It low down cpu load from 90% to 30%
If you yet run zabbix database
ALTER TABLE `event_recovery` ADD INDEX `event_recovery_idx_eventid_eventid` (`eventid`,`r_eventid`); ALTER TABLE `events` ADD INDEX `events_idx_source_object_object_value_eventi` (`source`,`object`,`objectid`,`value`,`eventid`);
If you make clean install, you can change mysql sheme (in attach)
patch -p1 schema.sql boost_load_wiget_problems_schema.patch
This path only added 2 indexes. It safe for using.
- duplicates
-
ZBX-12867 Too slow dashboard when big events table
- Closed