-
Type: Question
-
Resolution: Incomplete
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.2.9
-
Component/s: Concurrency
-
Labels:None
I have a complex aggregate query, that spans through 4 collections (3 collections have few hundred documents, and 1 collection has 15k documents) all have relevant indexes, that are indeed being used for the actual query.
The Aggregate query in question takes about 2-3 seconds for 1 user, but if 10 parallel threads with same query are sent at same time, it takes 80-100 seconds.
Environment details : single instance mongoDB Server
Version : 3.2.9
OS - RHEL 7.3
The actual area where the slowness is happening is at the Global Locks.
The aggregate query should have read locks, but it is causing "Global Write locks", refer attached snapshot.
(LEFT SIDE: 1 user sends aggregate query, the write locks can't be explained, but are not hurting as much)
(RIGHT SIDE : 10 users send same aggregate query, the write locks are taking significant time , whereas instead on READ locks were expected)