[ZBXNEXT-4696] Optimize history cache processing by performing trigger locking outside history cache lock Created: 2018 Aug 23  Updated: 2024 Apr 10  Resolved: 2018 Sep 03

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: 4.0.0beta2, 4.0 (plan)

Type: Change Request Priority: Trivial
Reporter: Andris Zeila Assignee: Andris Zeila
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File dbcache.diff     File dbsyncer_perf.diff    
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).



 Comments   
Comment by Andris Zeila [ 2018 Aug 28 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-4696

Comment by Andris Zeila [ 2018 Aug 31 ]

Released in:

  • pre-4.0.0beta2 r84406
Comment by richlv [ 2018 Aug 31 ]

The target version comment seems to be missing, as this has been merged already.

BTW, is Zabbix team still following the convention to put that comment in issues?

Comment by Andris Zeila [ 2018 Sep 03 ]

Sorry, speaking about myself - I keep forgetting to make 'released' comment public :/

Comment by richlv [ 2018 Sep 14 ]

Andri, thank you for the useful comments - when they are seen by anybody (community still mourning open communication).

Generated at Tue Apr 23 14:22:18 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.