Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-4696

Optimize history cache processing by performing trigger locking outside history cache lock

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.0.0beta2, 4.0 (plan)
    • None
    • Server (S)
    • None
    • Sprint 41
    • 1

      During history cache synchrinization server locks configuration cache within history cache lock. The processing is like:

      1. lock history cache
      2. get items from history cache
      3. lock triggers for retrieved items (configuration cache lock/unlock)
      4. put items with failed trigger locks back into history cache
      5. unlock history cache
      6. process values for items with successfully locked triggers
      7. unlock triggers for processed items (configuration cache lock/unlock)
      8. lock history cache
      9. put processed items back in history cache
      10. unlock history cache

      It's possible to get rid of lock nesting by moving trigger locking outside history cache lock, somthing like:

      1. lock history cache
      2. get items from history cache
      3. unlock history cache
      4. lock triggers for retrieved items (configuration cache lock/unlock)
      5. process values for items with successfully locked triggers
      6. unlock triggers for processed items (configuration cache lock/unlock)
      7. lock history cache
      8. put items with locked triggers back in history cache
      9. put processed items back in history cache
      10. unlock history cache

      Testing showed ~21% throughput (values per second) increase in data processing. The test patch is attached however it can be improved (hc_push_busy_items and hc_push_processed_items could be merged in one function).

            wiper Andris Zeila
            wiper Andris Zeila
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: