Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2862

Benchmark Collection and Client bulkWrite

    • Needed
    • Hide

      Summary of necessary driver changes

      •  

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      •  

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes   Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed)   Context for other referenced/linked tickets  

      Summary

      Benchmark Collection::bulkWrite and Client::bulkWrite

      Motivation

      DRIVERS-716 adds Client::bulkWrite. A main motivation is improved performance noted in Product Description: Bulk Write API 2.0:

      Improve write performance by reducing the number of round trips.

      When Client::bulkWrite saves round-trips, it may significantly improve performance. However, BulkWrite Syntax Investigation notes:

      Why is the current syntax slower than the alternate syntax?
      Requests of the current syntax take longer to parse on the server compared to requests of the alternate syntax due to the format of the data.

      During testing we noticed that constructing the request on the client side was taking longer with the current syntax. We will have to defer to drivers to determine the performance implications of both syntaxes with regards to request construction.

      Who is the affected end user?

      Users wanting to use the new Client::bulkWrite.

      How does this affect the end user?

      Measuring may help inform future improvements to Client::bulkWrite, possibly resulting in improved performance.

      How likely is it that this problem or use case will occur?

      Not applicable?

      If the problem does occur, what are the consequences and how severe are they?

      Not applicable?

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes.

      Acceptance Criteria

      Benchmark Collection::bulkWrite and Client::bulkWrite with mixed operations (e.g. insert + update) in the same namespace. Expect a significant increase in throughput due to saved round trips.

      Benchmark Collection::bulkWrite and Client::bulkWrite with insert-only operations in the same namespace. Expect an insignificant change in throughput due to similar number of round trips.

      Additional Information

      Consider adding benchmarks to MongoDB Driver Performance Benchmarking. The Small doc bulk insert and Large doc bulk insert benchmarks may be sufficient for benchmarking Collection::bulkWrite with insert-only operations.

      Rust initially added Client::bulkWrite but does not implement Collection::bulkWrite. Suggest initially implementing the benchmarks in a driver that has both.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: