Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72087

Avoid recording flow control wait time when there is no wait

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2022-12-26

      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.

            Assignee:
            matthew.russotto@mongodb.com Matthew Russotto
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: