[SERVER-59123] Add benchmarks for frequently used aggregation expressions Created: 27/Jul/21  Updated: 29/Oct/23  Resolved: 07/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: New Feature Priority: Major - P3
Reporter: Arun Banala Assignee: Kevin Cherkauer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-56422 Collect and expose usage statistics f... Closed
is depended on by SERVER-70260 Some agg expressions crash sbe_expres... Closed
Related
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-10-03, QE 2022-10-17
Participants:

 Description   

We currently only have C++ micro benchmark tests for very few aggregation expressions (mostly the ones that were added recently). We should extend coverage for frequently accessed aggregation expressions. We can collect the opcounters data from Atlas and figure out which expressions are often used by the users.



 Comments   
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'Kevin Cherkauer', 'email': 'kevin.cherkauer@mongodb.com', 'username': 'kevin-cherkauer'}

Message: SERVER-59123 Add benchmarks for frequently used aggregation expressions
Branch: master
https://github.com/mongodb/mongo/commit/5c505a067efd74e2c3050607895ab8e43b308aa7

Comment by Kevin Cherkauer [ 28/Sep/22 ]

I have verified that under SERVER-69798 these benchmarks are now polymorphic and run under both Classic (expression_bm executable) and SBE (sbe_expression_bm executable) and have succeeded in creating the first new one for agg_eq in my dev branch.

Restricting to just agg expressions to avoid scope creep, the new top 15 are

  1. agg_eq
  2. agg_if_null
  3. agg_const
  4. agg_cond
  5. agg_ne
  6. agg_meta
  7. agg_lte
  8. agg_gte
  9. agg_literal
  10. agg_switch
  11. agg_or
  12. agg_array_elem_at
  13. agg_add
  14. agg_filter
  15. agg_in
Comment by Mihai Andrei [ 28/Sep/22 ]

IMO, I would be fine with the ticket covering only agg expressions, since we should already have a lot of coverage for the common match expressions through the mongo-perf microbenchmarks/genny. Is there value in adding c++ microbenchmarks for the most common match expressions as well?

Comment by David Storch [ 28/Sep/22 ]

kevin.cherkauer@mongodb.com arun.banala@mongodb.com it sounds fine to me to have this ticket track adding benchmarks for the most common expressions. We can make sure we have the necessary coverage for SBE perf as a followup task. I agree with Arun that it would be good to add benchmarks to the fixture that Ivan implemented so that we automatically get coverage in both classic and SBE.

cc mihai.andrei@mongodb.com

Comment by Arun Banala [ 27/Sep/22 ]

kevin.cherkauer@mongodb.com Looks like there was a recent change by ivan.fefer@mongodb.com (SERVER-69798) unifies the expression benchmarking code for SBE and classic engine. So I believe if you add the benchmarks here, it should apply for both classic and SBE.

Comment by Kevin Cherkauer [ 26/Sep/22 ]

david.storch@mongodb.com My understanding of this ticket is that it is intended for adding the most common ones, which is what arun.banala@mongodb.com who opened it asked me to do (suggesting "top ten" if there is some sense of what those are). If you and he agree to change it to cover wider ground, it's fine with me.

Comment by David Storch [ 23/Sep/22 ]

kevin.cherkauer@mongodb.com I don't think we need to meet unless there is anything specific you want to go over. Is your plan to use this ticket to add coverage for all the expressions that we support in SBE? Or does this ticket remain about coverage for the most common expressions, in which case we need a separate work item for getting the SBE-related coverage?

Comment by Kevin Cherkauer [ 23/Sep/22 ]

Thank you mihai.andrei@mongodb.com.

david.storch@mongodb.com do you want a meeting to discuss further or does Mihai's list cover what you were looking for?

Comment by David Storch [ 22/Sep/22 ]

kevin.cherkauer@mongodb.com could you catch up with mihai.andrei@mongodb.com, myself, ivan.fefer@mongodb.com, and rui.liu@mongodb.com about this? Ivan did some work recently to add new C++ microbenchmarks for expressions, so it seems like this task should extend the work that he already did. In addition, the SBE perf team is interested in making sure we have coverage for all the expressions that are supported in SBE. This may be a slightly different subset than the most commonly used expressions, so we should add coverage for the union of (most commonly used) + (supported in SBE).

One last note: we just added a system to ingest this C++ microbenchmark data into our SBE perf Atlas cluster and Charts dashboard. You shouldn't have to do anything special to make this work, hopefully, but we should make sure that the relevant benchmark data shows up there.

Comment by Ana Meza [ 03/Aug/21 ]

Please consider to add this to Quick Wins bucket and create a SERVER Tickets

Comment by Arun Banala [ 28/Jul/21 ]

kateryna.kamenieva Based on the discussing during QE triage meeting, would you be able to help with getting this data from Atlas?

Generated at Thu Feb 08 05:46:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.