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

SessionWorkflow: yield before _receiveRequest

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2023-02-06
    • 120

      1-line change to fix BF-27452, increased long tail latency.

      From associated code comment with this fix:

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      +            // Yield here to avoid pinning the CPU. Give other threads some CPU
      +            // time to avoid a spiky latency distribution (BF-27452). Even if
      +            // this client can run continuously and receive another command
      +            // without blocking, we yield anyway. We WANT context switching, and
      +            // we're trying deliberately to make it happen, to reduce long tail
      +            // latency.
      +            _yieldPointReached();
                   _receiveRequest();
      

        1. image-2023-02-05-11-10-04-354.png
          image-2023-02-05-11-10-04-354.png
          71 kB
        2. image-2023-02-05-11-10-10-843.png
          image-2023-02-05-11-10-10-843.png
          71 kB
        3. newplot (4).png
          newplot (4).png
          73 kB
        4. screenshot-1.png
          screenshot-1.png
          263 kB

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: