-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
6.4.12
-
None
Create thousands of hosts with hundreds of items with history and trend storage.
push metrics via trapper to the hosts with current timestamps on the items.
Wait 3 or 4 hours.
Push more metrics to many of the items across many of the hosts with timestamps (clock) of 3 or 4 hours ago.
This generates one or more slow queries like so:
slow query: 833.4347 sec, "select itemid,num,value_min,value_avg,value_max from trends where clock=<TIME_FROM_3-4_HOURS_AGO> and (itemid in (1,2,3,4,5,6,7....) or itemid in (100,101,102,103....) or itemid in (....) or itemid in (...)) order by itemid,clock;"
Before the select query you can also observe several other slow queries occurring before and after like so:
slow query: 300.56674 sec, "update trends_uint set num=3,value_min=100,value_avg=100,value_max=100 where itemid=123456 and clock=<TIME_FROM_3-4_HOURS_AGO>;"
Depending on the timestamps of the metrics being pushed to the trappers, the queries above can repeat a few times for each trends hour that Zabbix is trying to update trends for. I understand these queries, but these queries put locks on the history syncers and then they are unable to sync any other data. Is there a better way to parallelize this to prevent history syncer usage from hitting 100% and allow the other history syncers to continue processing?
- duplicates
-
ZBX-23064 Problem with restart server - syncing trend data
- Closed