-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.2.0
-
Component/s: Performance, Query Operations
-
None
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.
- backports
-
JAVA-3077 Java driver upgrade causing slowness to some calls
- Closed