RTT measurements are inaccurate on Windows

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Server Selection
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      RTT measurements on Windows are inaccurate because we rely on time.monotonic and time.time which have low resolution. See https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount64#remarks:

      The resolution of the GetTickCount64 function is limited to the resolution of the system timer, which is typically in the range of 10 milliseconds to 16 milliseconds. The resolution of the GetTickCount64 function is not affected by adjustments made by the GetSystemTimeAdjustment function.

      If you need a higher resolution timer, use a multimedia timer or a high-resolution timer.

      This can be problematic in Windows because:

      1. RTT affects server selection with the default localThresholdMS of 15ms.
      2. RTT affects the behavior with CSOT, as seen in PYTHON-3522.

            Assignee:
            Unassigned
            Reporter:
            Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: