[SERVER-51165] synchronized ServiceContext getters are too slow Created: 26/Sep/20  Updated: 29/Oct/23  Resolved: 28/Sep/20

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

Type: Bug Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-51055 ServiceContext getters/setters are ra... Open
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service arch 2020-10-05
Participants:
Linked BF Score: 0

 Description   

Caused by SERVER-51055

The locking on getter operations is showing up as contention and performance drops in sys-perf (see BF-18938).

We can do the same job with a simple AtomicWord<uintptr_t> storage implementation and simulating a unique_ptr's ownership semantics.



 Comments   
Comment by Githook User [ 02/Oct/20 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-51165 SyncUnique Use atomic swap in setter, and AtomicWord<T*>
Branch: master
https://github.com/mongodb/mongo/commit/9c5456e9d9efc288b8ac46820adc59ba58d1ea63

Comment by Githook User [ 28/Sep/20 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-51165 faster ServiceContext getters via AtomicWord
Branch: master
https://github.com/mongodb/mongo/commit/945fa67b5788cef6b2868922354a10795f3f2826

Comment by Billy Donahue [ 26/Sep/20 ]

cr https://mongodbcr.appspot.com/697930001

Generated at Thu Feb 08 05:24:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.