[SERVER-75867] Performance experiment: Use fetchAndAddRelaxed for Mutex diagnostic counters Created: 07/Apr/23  Updated: 18/Apr/23  Resolved: 18/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Engineering Test Priority: Major - P3
Reporter: Vojislav Stojkovic Assignee: Alex Li
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File SERVER-75867-diff     File SERVER-75867.csv     PNG File image-2023-04-17-01-11-58-554.png    
Sprint: Service Arch 2023-04-17, Service Arch 2023-05-01
Participants:

 Description   

During the BF-28130 performance investigation, we noticed that approximately 3.1% of execution time is spent inside Mutex::_onQuickLock, Mutex::_onUnlock, and similar methods. These functions don't actually perform any locking or unlocking, they just increment the counters used for latch analysis and call diagnostic listeners. The counters are only written to in these methods, using fetchAndAdd(), and they're only read in one place in code (inside LatchAnalyzer) using loadRelaxed().

The goal of this ticket is to do preliminary performance testing to check whether replacing these fetchAndAdd() calls with fetchAndAddRelaxed() would yield any performance improvements.


Generated at Thu Feb 08 06:31:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.