[ZBX-24318] Slow LLD of hosts due to inefficient name comparison Created: 2024 Apr 05  Updated: 2024 Jun 07  Resolved: 2024 Jun 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: 7.0.1rc1, 7.2.0alpha1

Type: Problem report Priority: Trivial
Reporter: Vladislavs Sokurenko Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: 0.25m
Time Spent: Not Specified
Original Estimate: 0.25m

Attachments: File ZBX-24318-7.0.diff    
Issue Links:
Duplicate
Team: Team B
Sprint: S24-W22/23
Story Points: 0.5

 Description   

When discovering hosts they are checked for duplicates by iterating through all hosts for each host, this is very inefficient and takes long time, hashes should be used instead.

LLD for 100k hosts.

Before (takes unreasonably long 715 seconds):
 1410257 85.1  1.1 328816 187932 pts/0   S+   13:42  11:39 ./sbin/zabbix_server: lld worker #1 [processed 1 LLD rules, idle 8.372470 sec during 715.515829 sec]

After patch it is finished in reasonable 53 seconds:
68.1  1.1 328800 187700 pts/0   S+   13:40   0:36 ./sbin/zabbix_server: lld worker #1 [processed 1 LLD rules, idle 9.348398 sec during 53.101660 sec]



 Comments   
Comment by Sergey [ 2024 May 07 ]

Fix pls for 6.4.*

Comment by Andrey Bitnyy [ 2024 May 09 ]

Same problem. I would not like to wait for version 7.

Comment by Artem Isaenko [ 2024 May 10 ]

+1 Can’t just change the OS to quickly update to 7.0 after release, because it’s a production environment. Can we expect a fix to be released in version 6.4?
We have many hosts and this is very affect for lld workers.

Comment by Venos [ 2024 May 13 ]

+1 Have the same problem. Indeed, a solution to this problem is desirable in version 6.4

Comment by Vladislavs Sokurenko [ 2024 May 29 ]

Pure host discovery
Before:
1110456 95.5 0.7 286464 147560 pts/2 S+ 14:20 11:05 ./sbin/zabbix_server: lld worker #1 [processed 1 LLD rules, idle 5.047609 sec during 676.253832 sec]

After:
1162099 5.4 0.7 286460 147876 pts/0 S+ 14:33 0:00 ./sbin/zabbix_server: lld worker #1 [processed 1 LLD rules, idle 6.769435 sec during 13.130958 sec]

Comment by Vladislavs Sokurenko [ 2024 Jun 06 ]

Fixed in:

Generated at Sat Apr 19 08:09:26 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.