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

    Details

    • Type: Change Request
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0beta2, 4.0 (plan)
    • Component/s: Server (S)
    • Labels:
      None
    • Team:
      Team A
    • Sprint:
      Sprint 41
    • Story Points:
      1

      Description

      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).

        Attachments

          Activity

            People

            • Assignee:
              wiper Andris Zeila
              Reporter:
              wiper Andris Zeila
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: