-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Service Arch
-
Fully Compatible
-
Service Arch 2024-03-04, Service Arch 2024-03-18, Service Arch 2024-04-01
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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.