[SERVER-72087] Avoid recording flow control wait time when there is no wait Created: 13/Dec/22  Updated: 29/Oct/23  Resolved: 16/Dec/22

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

Type: Bug Priority: Minor - P4
Reporter: Matthew Russotto Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-43987 Require predicates with OperationCont... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2022-12-26
Participants:

 Description   

Since SERVER-43987 we record the wait time to get a flow control ticket even when a ticket is immediately available. This ends up just recording the time it takes to make system calls, and also adds a small (5-10us) additional overhead on operations which take obtain a flow control ticket. We should not record wait time when a ticket is immediately available. Additionally we should use a clock source rather than making direct system calls to get the wait time. Since this is a token-bucket algorithm refreshing every second, the fast clock source (10ms precision) should be precise enough.



 Comments   
Comment by Githook User [ 15/Dec/22 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-72087 Avoid recording flow control wait time when there is no wait
Branch: master
https://github.com/mongodb/mongo/commit/e6953857195095210fed3a10a83c4b1ed325510e

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