Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2138

Performance regression between OP_QUERY and find command

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Do
    • Affects Version/s: 3.2.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      The 3.2 driver introduce support for the find and getMore commands added to the 3.2 server. The driver uses these commands instead of OP_QUERY and OP_GET_MORE when it's connected to a 3.2 server or newer.

      However, benchmarks show that the 3.2 driver performance for queries has degraded when using the new code path. Instrumentation of the driver shows that the degradation can be attributed partially to the server and partially to the driver.

      The working hypothesis is that there is more overhead handling find command reply messages than normal OP_REPLY messages. In particular:

      • failure detection is less efficient, as the driver has to search for the ok field in the command reply instead of checking a bit in the wire protocol
      • response document decoding is less efficient, as the driver has to decode response documents contained in a BSON array instead of packed BSON documents at the end of the OP_REPLY.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jeff.yemin Jeffrey Yemin
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: