[SERVER-13088] Scalability of distinct is sub-optimal Created: 07/Mar/14  Updated: 06/Dec/22  Resolved: 14/Sep/18

Status: Closed
Project: Core Server
Component/s: Concurrency, MMAPv1, Querying
Affects Version/s: 2.6.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Davide Italiano Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 2
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File distinct.png    
Assigned Teams:
Query
Operating System: ALL
Steps To Reproduce:

Get mongo-perf at https://github.com/mongodb/mongo , build, and run

./benchmark --test command --raw

and wait for the output of Distinct

{With,Without}

Index.

Participants:

 Description   

mongo-perf shows distinct doesn't scale very well, and the problem gets evident after 4 threads. This is tested on a recent 12-core Xeon. The problem affects every version of mongo I was able to test on (namely 2.2, 2.4, 2.6). Screenshot attached.



 Comments   
Comment by Asya Kamsky [ 06/Nov/17 ]

I've run some quick tests and confirmed that this seems to only affect MMAPV1.

Generated at Thu Feb 08 03:30:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.