Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1404

Improve performance of SelectServer

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: Server Selection
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      We're seeing a large fraction of time being spent in server selection; around 30% of the time taken by "driver.Operation.Execute" is being spent in "driver.Operation.selectServer", vs 45% for "driver.Operation.roundTrip", which obviously includes network roundtrip(s).

      A large fraction of "driver.Operation.selectServer" seems to be around "Subscribe", and it seems that could easily be avoidable in an initial fast path, where you'd expect a server to always be available. Related to this, we're also seeing server selection timeouts with a 20ms server selection timeout – it appears that the subscription logic is sometimes slow enough that we're hitting that timeout even if server selection could otherwise be satisfied.

        Attachments

        1. cpu.pprof
          10 kB
        2. server_selection.go
          1 kB

          Activity

            People

            Assignee:
            divjot.arora Divjot Arora
            Reporter:
            bartle David Bartley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: