Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28642

The Same query's performance reduces by 40 folds for 10 concurrent users

    • Type: Icon: Question Question
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 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)

            Assignee:
            mark.agarunov Mark Agarunov
            Reporter:
            wadhwanig Gulshan Wadhwani
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: