Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2376

Performance loss with small reads and writes

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: 1.9.0
    • Component/s: libmongoc
    • None

      Somewhere between commits a3c8a76 and 470fb4175c we lost a lot of performance in TestRunCommand, TestSmallDocInsertOne, and TestFindOneByID. The tests that read and write larger messages have such noisy results it's possible we missed a regression there too.

      https://evergreen.mongodb.com/task/mongo_c_driver_perf_c_driver_benchmark_mongo32_BenchMarkTests_76791d6e7dc01cd1b55d838eaf16fc4f2291d746_17_11_14_19_43_24

      There's a large number of changes between the benchmark runs, so it's hard to say if it's changes to compression, or changes to the OP_QUERY path related to implementing OP_MSG, or if it's a mistake in CDRIVER-2172.

      The C Driver's performance benchmark suite is in a separate repo:

      https://github.com/mongodb/mongo-c-driver-performance

      Its Evergreen configuration is in the main repo, however:

      https://github.com/mongodb/mongo-c-driver/blob/master/.evergreen/benchmark.yml

      Instructions for running the benchmark suite are in that mongo-c-driver-performance README.

      Some performance tests use JSON files. Download them with the download-test-data.py program in the mongo-c-driver-performance repo.

      Make sure you've built and installed a release version of libbson and libmongoc for the correct version that you want to test. Build libbson something like:

      git checkout SOME_GIT_HASH
      mkdir cmake-build-release
      cd cmake-build-release
      cmake -DCMAKE_BUILD_TYPE=RELEASE .. && make && sudo make install
      

      Same for libmongoc. Not all versions of libbson and libmongoc are compatible with each other (because of the history of this year's development),

      Now in the mongo-c-driver-performance repo, build the mongo-c-performance program. Start a MongoDB 3.2 standalone on localhost. Run the tests:

      ./mongo-c-performance performance-testdata/ TestRunCommand

      You can specify multiple test names on the command line.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: