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

after ZBX-6118, still low performance changing template linked with many hosts

XMLWordPrintable

    • Sprint 43, Sprint 44, Sprint 45, Sprint 46, Nov 2018, Sprint 47, Dec 2018, Sprint 48, Jan 2019
    • 2

      Even after ZBX-6118 fix, there is an issue with updating an item on template, linked to many hosts.

      Here is a very slow query in item.update method (new approach implemented in the ZBX-6118, code comment //Check if item with a new key already exists on the child host.):

      SQL (365.230574): SELECT i.hostid,i.key_ FROM items i WHERE (i.hostid='26408' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='23653' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='12258' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='30083' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='27971' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='25683' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='26413' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') OR (i.hostid='16902' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]')...OR (i.hostid='19010' AND i.key_='logrt[/var/log/messages,(error(?!.*dev fd0)),,,skip,,]') LIMIT 1
      

      and possible related issue:

      Total time: 949.184311
      Total SQL time: 372.596001
      SQL count: 6601 (selects: 89 | executes: 6512)
      Peak memory usage: 4000.75M
      Memory limit: 16G
      

      ~13000 hosts are linked to the template.

      There is an opinion from dotneft that, quote: During item update in a template "itemid" order is not ascending. Which lead to possible deadlock, especially with log items.

      It's decided to fix it separately of ZBX-3783 because its critical.

       

            sasha Alexander Vladishev
            zalex_ua Oleksii Zagorskyi
            Team B
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: