[SERVER-84577] Reduce the cost of recording `currentOp` metrics Created: 05/Jan/24  Updated: 09/Jan/24

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

Type: Improvement Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Service Arch
Participants:

 Description   

Recording currentOp metrics could result in updating multiple counters, shared between all active database operations: https://github.com/mongodb/mongo/blob/b20acb9030068e9fbc38df118361b77960d5e1f9/src/mongo/db/curop_metrics.cpp#L61-L96

Currently, updating each counter results in invalidating its copies in the L1 cache of all other CPU cores. The idea is to avoid this overhead and change the counters to be less expensive when updated on the hot path.


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