-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
When SBE is enabled, the aggregate() command from the all_word_count_no_merge benchmark (from the bestbuy_agg_merge_wordcount suite) is noticeably slower vs. the classic execution engine.
At the time of this writing, on my local machine this benchmark takes 22243ms when SBE is enabled, compared with 11873ms for the classic execution engine (i.e. SBE disabled).
Instructions on how to run the aggregate() command:
1) Download the bestbuy dataset.
2) Start mongod. If you want to enabled SBE, pass '--setParameter "featureFlagSBE=true"' on the command line.
3) Load the bestbuy dataset using the following command:
mongorestore --gzip --archive=bestbuyproducts.bson.gz
4) Launch the mongo shell and run the following commands to prepare your environment:
> function millis(command) { const t1 = new Date(); const result = command(); const t2 = new Date(); print("time: " + (t2 - t1) + "ms"); return (t2-t1); } > use bestbuy
5) Run the following command multiple times to measure the performance of the aggregate() command:
> millis(() => db.products.aggregate([{"$project":{"wordOfDesc":{"$split":["$longDescription"," "]}}},{"$unwind":"$wordOfDesc"},{"$group":{"_id":"$wordOfDesc","count":{"$sum":1.0}}}]).itcount())
Note that step #5 above will print out the amount of time the entire "aggregate(..).itcount()" shell command takes from the client's perspective. If you are interested in how long each individual mongo command takes on the server, consider using the slow query timer.
- duplicates
-
SERVER-54078 [SBE] Improve perf of the bestbuy_agg_merge_wordcount benchmark suite
- Closed