mongodb / mongo-perf

performance tools for mongodb
351 stars 140 forks source link

PERF-2565 Added a Micro-benchmark for getMore Commands #81

Closed mdashti closed 3 years ago

mdashti commented 3 years ago

This PR adds a micro-benchmark that applies scan and non-selective-filter over a big collection with:

These operations are followed with several getMore commands to read the whole result. This benchmark mostly measures the impact of getMore commands, as the query processing part is very simple and most of the time is spent on requesting the whole big result-set via several getMore commands.

mdashti commented 3 years ago

I'd suggest also apply the following diff to etc/perf.yml:

diff --git a/etc/perf.yml b/etc/perf.yml
index b633fde51ce..6b6323d4da2 100644
--- a/etc/perf.yml
+++ b/etc/perf.yml
@@ -474,6 +474,18 @@ tasks:
              exclude_filter: single_threaded,
              threads: "1 2 4 8",
              read_cmd: 'true'}
+  - name: big_collection
+    depends_on: *_compile
+    commands:
+      - func: f_run_dsi_workload
+        vars:
+          test_control: microbenchmarks
+          test_control_params: |
+            {include_filter_1: query,
+             include_filter_2: getmore,
+             exclude_filter: none,
+             threads: "1 2 4 8",
+             read_cmd: 'true'}
   - name: views-query
     depends_on: *_compile
     commands:
@@ -735,6 +747,7 @@ microbenchmark-buildvariants:
     - name: compile
       distros:
       - rhel62-large
+    - name: big_collection
     - name: genny_scale_InsertRemove
     - name: genny_execution_UserAcquisition
     - name: aggregation_read_commands

If you agree, I can create a separate SERVER ticket for that change and create a separate PR for it.

brad-devlugt commented 3 years ago

Hey @mdashti thanks for the PR and new workload. I'm substituting in for David as a reviewer from the perf team. Could you please run a few patches with this change + the etc/perf.yml change to see what the overall noise level is like for the new test? Please reach out if you have any questions!

mdashti commented 3 years ago

@brad-devlugt Thanks for accepting to take a look at this PR.

Here are a few evergreen patches:

  1. https://spruce.mongodb.com/version/615cb5f22fbabe26cd1ac66a
  2. https://spruce.mongodb.com/version/615cb6790305b951efd5a5e6
  3. https://spruce.mongodb.com/version/615cb6cb1e2d175df439fe3c
  4. https://spruce.mongodb.com/version/615cb6f1e3c3316dc7eaf06f
mdashti commented 3 years ago

Thanks for the review @brad-devlugt. Applied your suggestions. Here's the evergreen build: https://spruce.mongodb.com/version/615f43e53e8e86320ca969c5

brad-devlugt commented 3 years ago

Thanks! LGTM